Options
All
  • Public
  • Public/Protected
  • All
Menu
AWS Amplify

current aws-amplify package version weekly downloads GitHub Workflow Status (with event) code coverage join discord

Reporting Bugs / Feature Requests

Open Bugs Feature Requests Closed Issues

Note aws-amplify 6 has been released. If you are looking for upgrade guidance click here

AWS Amplify is a JavaScript library for frontend and mobile developers building cloud-enabled applications

AWS Amplify provides a declarative and easy-to-use interface across different categories of cloud operations. AWS Amplify goes well with any JavaScript based frontend workflow and React Native for mobile developers.

Our default implementation works with Amazon Web Services (AWS), but AWS Amplify is designed to be open and pluggable for any custom backend or service.

Visit our Documentation site to learn more about AWS Amplify. Please see our Amplify JavaScript page within our Documentation site for information around the full list of features we support.

Features

Category AWS Provider Description
Authentication Amazon Cognito APIs and Building blocks to create Authentication experiences.
Analytics Amazon Pinpoint Collect Analytics data for your application including tracking user sessions.
REST API Amazon API Gateway Sigv4 signing and AWS auth for API Gateway and other REST endpoints.
GraphQL API AWS AppSync Interact with your GraphQL or AWS AppSync endpoint(s).
DataStore AWS AppSync Programming model for shared and distributed data, with simple online/offline synchronization.
Storage Amazon S3 Manages content in public, protected, private storage buckets.
Geo (Developer preview) Amazon Location Service Provides APIs and UI components for maps and location search for JavaScript-based web apps.
Push Notifications Amazon Pinpoint Allows you to integrate push notifications in your app with Amazon Pinpoint targeting and campaign management support.
Interactions Amazon Lex Create conversational bots powered by deep learning technologies.
PubSub AWS IoT Provides connectivity with cloud-based message-oriented middleware.
Internationalization --- A lightweight internationalization solution.
Cache --- Provides a generic LRU cache for JavaScript developers to store data with priority and expiration settings.
Predictions Various* Connect your app with machine learning services like NLP, computer vision, TTS, and more.
  • Predictions utilizes a range of Amazon's Machine Learning services, including: Amazon Comprehend, Amazon Polly, Amazon Rekognition, Amazon Textract, and Amazon Translate.

Getting Started

AWS Amplify is available as aws-amplify on npm.

To get started pick your platform from our Getting Started home page

Notice:

Amplify 6.x.x has breaking changes. Please see the breaking changes on our migration guide

Amplify 5.x.x has breaking changes. Please see the breaking changes below:

  • If you are using default exports from any Amplify package, then you will need to migrate to using named exports. For example:

    - import Amplify from 'aws-amplify';
    + import { Amplify } from 'aws-amplify'
    
    - import Analytics from '@aws-amplify/analytics';
    + import { Analytics } from '@aws-amplify/analytics';
    // or better
    + import { Analytics } from 'aws-amplify';
    
    - import Storage from '@aws-amplify/storage';
    + import { Storage } from '@aws-amplify/storage';
    // or better
    + import { Storage } from 'aws-amplify';
  • Datastore predicate syntax has changed, impacting the DataStore.query, DataStore.save, DataStore.delete, and DataStore.observe interfaces. For example:

    - await DataStore.delete(Post, (post) => post.status('eq', PostStatus.INACTIVE));
    + await DataStore.delete(Post, (post) => post.status.eq(PostStatus.INACTIVE));
    
    - await DataStore.query(Post, p => p.and( p => [p.title('eq', 'Amplify Getting Started Guide'), p.score('gt', 8)]));
    + await DataStore.query(Post, p => p.and( p => [p.title.eq('Amplify Getting Started Guide'), p.score.gt(8)]));
  • Storage.list has changed the name of the maxKeys parameter to pageSize and has a new return type that contains the results list. For example:

    - const photos = await Storage.list('photos/', { maxKeys: 100 });
    - const { key } = photos[0];
    
    + const photos = await Storage.list('photos/', { pageSize: 100 });
    + const { key } = photos.results[0];
  • Storage.put with resumable turned on has changed the key to no longer include the bucket name. For example:

    - let uploadedObjectKey;
    - Storage.put(file.name, file, {
    -   resumable: true,
    -   // Necessary to parse the bucket name out to work with the key
    -   completeCallback: (obj) => uploadedObjectKey = obj.key.substring( obj.key.indexOf("/") + 1 )
    - }
    
    + let uploadedObjectKey;
    + Storage.put(file.name, file, {
    +   resumable: true,
    +   completeCallback: (obj) => uploadedObjectKey = obj.key
    + }
  • Analytics.record no longer accepts string as input. For example:

    - Analytics.record('my example event');
    + Analytics.record({ name: 'my example event' });
  • The JS export has been removed from @aws-amplify/core in favor of exporting the functions it contained.

  • Any calls to Amplify.Auth, Amplify.Cache, and Amplify.ServiceWorker are no longer supported. Instead, your code should use the named exports. For example:

    - import { Amplify } from 'aws-amplify';
    - Amplify.configure(...);
    - // ...
    - Amplify.Auth.signIn(...);
    
    + import { Amplify, Auth } from 'aws-amplify';
    + Amplify.configure(...);
    + // ...
    + Auth.signIn(...);

Amplify 4.x.x has breaking changes for React Native. Please see the breaking changes below:

  • If you are using React Native (vanilla or Expo), you will need to add the following React Native community dependencies:
    • @react-native-community/netinfo
    • @react-native-async-storage/async-storage
// React Native
yarn add aws-amplify amazon-cognito-identity-js @react-native-community/netinfo @react-native-async-storage/async-storage
npx pod-install

// Expo
yarn add aws-amplify @react-native-community/netinfo @react-native-async-storage/async-storage

Amplify 3.x.x has breaking changes. Please see the breaking changes below:

  • AWS.credentials and AWS.config don’t exist anymore in Amplify JavaScript.
    • Both options will not be available to use in version 3. You will not be able to use and set your own credentials.
    • For more information on this change, please see the AWS SDK for JavaScript v3
  • aws-sdk@2.x has been removed from Amplify@3.x.x in favor of version 3 of aws-sdk-js. We recommend to migrate to aws-sdk-js-v3 if you rely on AWS services that are not supported by Amplify, since aws-sdk-js-v3 is imported modularly.

If you can't migrate to aws-sdk-js-v3 or rely on aws-sdk@2.x, you will need to import it separately.

  • If you are using exported paths within your Amplify JS application, (e.g. import from "@aws-amplify/analytics/lib/Analytics") this will now break and no longer will be supported. You will need to change to named imports:

    import { Analytics } from 'aws-amplify';
  • If you are using categories as Amplify.<Category>, this will no longer work and we recommend to import the category you are needing to use:

    import { Auth } from 'aws-amplify';

DataStore Docs

For more information on contributing to DataStore / how DataStore works, see the DataStore Docs

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

APIConfig

APIGraphQLConfig

APIGraphQLConfig: object

Type declaration

  • Optional apiKey?: string

    Optional API key string. Required only if the auth mode is 'apiKey'.

  • Optional customEndpoint?: string

    Custom domain endpoint for GraphQL API.

  • Optional customEndpointRegion?: string

    Optional region string used to sign the request to customEndpoint. Effective only if customEndpoint is specified, and the auth mode is 'iam'.

  • defaultAuthMode: GraphQLAuthMode

    Default auth mode for all the API calls to given service.

  • endpoint: string

    Required GraphQL endpoint, must be a valid URL string.

  • Optional modelIntrospection?: ModelIntrospectionSchema
  • Optional region?: string

    Optional region string used to sign the request. Required only if the auth mode is 'iam'.

APIRestConfig

APIRestConfig: object

Type declaration

  • endpoint: string

    Required REST endpoint, must be a valid URL string.

  • Optional region?: string

    Optional region string used to sign the request with IAM credentials. If Omitted, region will be extracted from the endpoint.

    default

    'us-east-1'

  • Optional service?: string

    Optional service name string to sign the request with IAM credentials.

    default

    'execute-api'

AWSAppSyncRealTimeAuthInput

AWSAppSyncRealTimeAuthInput: Partial<AWSAppSyncRealTimeProviderOptions> & object

AWSAuthDevice

AWSAuthDevice: AuthDevice & object

Holds the device specific information along with it's id and name.

AWSAuthUser

AWSAuthUser: object

The AWSAuthUser object contains username and userId from the idToken.

Type declaration

  • userId: string
  • username: string

AWSCredentials

AWSCredentials: object

Type declaration

  • accessKeyId: string
  • Optional expiration?: Date
  • secretAccessKey: string
  • Optional sessionToken?: string

AWSLexProviderSendResponse

AWSLexProviderSendResponse: PostTextCommandOutput | PostContentCommandOutputFormatted

AWSLexV2ProviderSendResponse

AWSLexV2ProviderSendResponse: RecognizeTextCommandOutput | RecognizeUtteranceCommandOutputFormatted

AbortMultipartUploadInput

AbortMultipartUploadInput: Pick<AbortMultipartUploadCommandInput, "Bucket" | "Key" | "UploadId">

ActionMap

ActionMap: object

Type declaration

AdditionalDetails

AdditionalDetails: [][]

Alignment

Alignment: object[keyof typeof Alignment]

AllFieldOperators

AllFieldOperators: keyof AllOperators

AllOperators

AllOperators: NumberOperators<any> & StringOperators<any> & ArrayOperators<any>

AmazonLocationServiceBatchGeofenceError

AmazonLocationServiceBatchGeofenceError: Omit<GeofenceError, "error"> & object

AmazonLocationServiceBatchGeofenceErrorMessages

AmazonLocationServiceBatchGeofenceErrorMessages: "AccessDeniedException" | "InternalServerException" | "ResourceNotFoundException" | "ThrottlingException" | "ValidationException"

AmazonLocationServiceDeleteGeofencesResults

AmazonLocationServiceDeleteGeofencesResults: Omit<DeleteGeofencesResults, "errors"> & object

AmazonLocationServiceGeofence

AmazonLocationServiceGeofence: Omit<Geofence, "status"> & object

AmazonLocationServiceGeofenceOptions

AmazonLocationServiceGeofenceOptions: GeofenceOptions & object

AmazonLocationServiceGeofenceStatus

AmazonLocationServiceGeofenceStatus: "ACTIVE" | "PENDING" | "FAILED" | "DELETED" | "DELETING"

AmazonLocationServiceListGeofenceOptions

AmazonLocationServiceListGeofenceOptions: ListGeofenceOptions & object

AmplifyChannel

AmplifyChannel: "auth"

AmplifyContext

AmplifyContext: object

Type declaration

  • InternalAPI: typeof InternalAPI

AmplifyErrorMap

AmplifyErrorMap: object

Type declaration

AmplifyErrorParams

AmplifyErrorParams: object

Type declaration

  • message: string
  • name: ErrorCode
  • Optional recoverySuggestion?: string
  • Optional underlyingError?: Error | unknown

AmplifyEventData

AmplifyEventData: object

Type declaration

AmplifyHubCallbackMap

AmplifyHubCallbackMap: object

Type declaration

AmplifyServerContextSpec

AmplifyServerContextSpec: ContextSpec

AmplifyWebBrowser

AmplifyWebBrowser: object

Type declaration

  • openAuthSessionAsync: function
      • (url: string, redirectUrls: string[], prefersEphemeralSession?: boolean): Promise<string | null>
      • Parameters

        • url: string
        • redirectUrls: string[]
        • Optional prefersEphemeralSession: boolean

        Returns Promise<string | null>

AnalyticsConfig

AnalyticsConfigureAutoTrackInput

AnalyticsConfigureAutoTrackInput: object & object | object | object

Input type for configureAutoTrack.

AnalyticsEventAttributes

AnalyticsEventAttributes: object

Type declaration

AnalyticsIdentifyUserInput

AnalyticsIdentifyUserInput: object

Input type for identifyUser.

Type declaration

  • Optional options?: ServiceOptions

    Options to be passed to the API.

  • userId: string

    A User ID associated to the current device.

  • userProfile: UserProfile

    Additional information about the user and their device.

AnalyticsServiceOptions

AnalyticsServiceOptions: Record<string, unknown>

Base type for service options.

AndroidPermissionStatus

AndroidPermissionStatus: "ShouldRequest" | "ShouldExplainThenRequest" | "Granted" | "Denied"

ApiInput

ApiInput: object
internal

Type declaration

  • apiName: string

    Name of the REST API configured in Amplify singleton.

  • Optional options?: Options

    Options to overwrite the REST API call behavior.

  • path: string

    Path of the REST API.

ApnsMessage

ApnsMessage: object

Type declaration

  • aps: object
    • Optional alert?: object
      • Optional body?: string
      • Optional subtitle?: string
      • Optional title?: string
  • Optional completionHandlerId?: string
  • Optional data?: object
    • Optional media-url?: string
    • Optional pinpoint?: NativeAction
  • Optional rawData?: never

ArchiveStatus

ArchiveStatus: object[keyof typeof ArchiveStatus]

ArrayOperators

ArrayOperators: object

Type declaration

  • contains: T
  • notContains: T

AssertionFunction

AssertionFunction: function

Type declaration

    • (assertion: boolean, name: ErrorCode, additionalContext?: string): assertion
    • Parameters

      • assertion: boolean
      • name: ErrorCode
      • Optional additionalContext: string

      Returns assertion

AssociatedWith

AssociatedWith: object

Type declaration

  • associatedWith: string | string[]
  • connectionType: "HAS_MANY" | "HAS_ONE"
  • Optional targetName?: string
  • Optional targetNames?: string[]

AssociationBaseType

AssociationBaseType: object

Type declaration

AssociationBelongsTo

AssociationBelongsTo: AssociationBaseType & object

AssociationHasMany

AssociationHasMany: AssociationBaseType & object

AssociationHasOne

AssociationHasOne: AssociationBaseType & object

AssociationType

AtLeastOne

AtLeastOne: Partial<T> & U[keyof U]

AuthAdditionalInfo

AuthAdditionalInfo: object

Additional data that may be returned from Auth APIs.

Type declaration

  • [key: string]: string

AuthAllowedMFATypes

AuthAllowedMFATypes: AuthMFAType[]

AuthAnyAttribute

AuthAnyAttribute: string & object

AuthAttribute

AuthAttribute: object

Type declaration

  • properties: object
  • type: "auth"

AuthCodeDeliveryDetails

AuthCodeDeliveryDetails: object

Data describing the dispatch of a confirmation code.

Type declaration

  • Optional attributeName?: UserAttributeKey
  • Optional deliveryMedium?: AuthDeliveryMedium
  • Optional destination?: string

AuthConfig

AuthConfigUserAttributes

AuthConfigUserAttributes: Partial<Record<AuthStandardAttributeKey, object>>

AuthConfirmResetPasswordInput

AuthConfirmResetPasswordInput: object

Type declaration

  • confirmationCode: string
  • newPassword: string
  • Optional options?: ServiceOptions
  • username: string

AuthConfirmSignInInput

AuthConfirmSignInInput: object

Constructs a confirmSignIn input.

param

required parameter for responding to {@link AuthSignInStep } returned during the sign in process.

param

optional parameters for the Confirm Sign In process such as the service options

Type declaration

  • challengeResponse: string
  • Optional options?: ServiceOptions

AuthConfirmSignUpInput

AuthConfirmSignUpInput: object

Constructs a confirmSignUp input.

param

a standard username, potentially an email/phone number

param

the user's confirmation code sent to email or cellphone

param

optional parameters for the Sign Up process, including user attributes

Type declaration

  • confirmationCode: string
  • Optional options?: ServiceOptions
  • username: string

AuthConfirmUserAttributeInput

AuthConfirmUserAttributeInput: object

Type declaration

  • confirmationCode: string
  • userAttributeKey: UserAttributeKey

AuthDeleteUserAttributesInput

AuthDeleteUserAttributesInput: object

Constructs a deleteUserAttributes input.

param

the user attribute keys to be deleted

Type declaration

  • userAttributeKeys: []

AuthDeliveryMedium

AuthDeliveryMedium: "EMAIL" | "SMS" | "PHONE" | "UNKNOWN"

Denotes the medium over which a confirmation code was sent.

AuthDevice

AuthDevice: object

The AuthDevice object contains id and name of the device.

Type declaration

  • id: string

AuthErrorMessages

AuthErrorMessages: object

Type declaration

AuthForgetDeviceInput

AuthForgetDeviceInput: object

Constructs a forgetDevice input.

param

optional parameter to forget an external device

Type declaration

AuthHubEventData

AuthHubEventData: object | object | object | object | object | object | object

AuthIdentityPoolConfig

AuthIdentityPoolConfig: object

Type declaration

AuthKeys

AuthKeys: object

Type declaration

AuthMFAType

AuthMFAType: "SMS" | "TOTP"

AuthModeParams

AuthModeParams: object

Type declaration

AuthModeStrategy

AuthModeStrategy: function

Type declaration

AuthModeStrategyParams

AuthModeStrategyParams: object

Type declaration

AuthModeStrategyReturn

AuthModeStrategyReturn: GraphQLAuthMode | GraphQLAuthMode[] | undefined | null

AuthNextResetPasswordStep

AuthNextResetPasswordStep: object

Type declaration

AuthNextSignInStep

AuthNextSignUpStep

AuthNextSignUpStep: ConfirmSignUpSignUpStep<UserAttributeKey> | AutoSignInSignUpStep<UserAttributeKey> | DoneSignUpStep

Data encapsulating the next step in the Sign Up process

AuthNextUpdateAttributeStep

AuthNextUpdateAttributeStep: object

Type declaration

AuthProvider

AuthProvider: "Amazon" | "Apple" | "Facebook" | "Google"

AuthProviders

AuthProviders: object

Type declaration

  • functionAuthProvider: function

AuthResendSignUpCodeInput

AuthResendSignUpCodeInput: object

The parameters for constructing a Resend Sign Up code input.

param

a standard username, potentially an email/phone number

param

optional parameters for the Sign Up process such as the plugin options

Type declaration

  • Optional options?: ServiceOptions
  • username: string

AuthResetPasswordInput

AuthResetPasswordInput: object

Type declaration

  • Optional options?: ServiceOptions
  • username: string

AuthResetPasswordOutput

AuthResetPasswordOutput: object

Type declaration

AuthResetPasswordStep

AuthResetPasswordStep: "CONFIRM_RESET_PASSWORD_WITH_CODE" | "DONE"

Denotes the next step in the Reset Password process.

AuthRule

AuthRule: object

Only the portions of an Auth rule we care about.

Type declaration

  • allow: string
  • Optional ownerField?: string

AuthSendUserAttributeVerificationCodeInput

AuthSendUserAttributeVerificationCodeInput: object

Constructs a sendUserAttributeVerificationCode request.

param

the user attribute key

param

optional parameters for the Resend Attribute Code process such as the service options.

Type declaration

  • Optional options?: ServiceOptions
  • userAttributeKey: UserAttributeKey

AuthServiceOptions

AuthServiceOptions: Record<string, unknown>

Base type for service options.

AuthSession

AuthSession: object

Type declaration

  • Optional credentials?: AWSCredentials
  • Optional identityId?: string
  • Optional tokens?: AuthTokens
  • Optional userSub?: string

AuthSignInInput

AuthSignInInput: object

Type declaration

  • Optional options?: ServiceOptions
  • Optional password?: string
  • username: string

AuthSignInOutput

AuthSignInOutput: object

Type declaration

AuthSignInWithRedirectInput

AuthSignInWithRedirectInput: object

Type declaration

  • Optional customState?: string
  • Optional options?: object
    • Optional preferPrivateSession?: boolean

      On iOS devices, setting this to true requests that the browser not share cookies or other browsing data between the authentication session and the user’s normal browser session. This will bypass the permissions dialog that is displayed your user during sign-in and sign-out but also prevents reuse of existing sessions from the user's browser, requiring them to re-enter their credentials even if they are already externally logged in on their browser.

      On all other platforms, this flag is ignored.

  • Optional provider?: AuthProvider | object

AuthSignOutInput

AuthSignOutInput: object

Type declaration

  • global: boolean

AuthSignUpInput

AuthSignUpInput: object

The parameters for constructing a Sign Up input.

param

a standard username, potentially an email/phone number

param

the user's password

param

optional parameters for the Sign Up process, including user attributes

Type declaration

  • Optional options?: ServiceOptions
  • password: string
  • username: string

AuthSignUpOptions

AuthSignUpOptions: object

The optional parameters for the Sign Up process.

remarks

Particular services may require some of these parameters.

Type declaration

AuthSignUpOutput

AuthSignUpOutput: object

Type declaration

  • isSignUpComplete: boolean
  • nextStep: AuthNextSignUpStep<UserAttributeKey>
  • Optional userId?: string

AuthStandardAttributeKey

AuthStandardAttributeKey: "address" | "birthdate" | "email_verified" | "family_name" | "gender" | "given_name" | "locale" | "middle_name" | "name" | "nickname" | "phone_number_verified" | "picture" | "preferred_username" | "profile" | "sub" | "updated_at" | "website" | "zoneinfo" | AuthVerifiableAttributeKey

AuthTOTPSetupDetails

AuthTOTPSetupDetails: object

Type declaration

  • getSetupUri: function
      • (appName: string, accountName?: string): __type
      • Parameters

        • appName: string
        • Optional accountName: string

        Returns __type

  • sharedSecret: string

AuthTokens

AuthTokens: object

Type declaration

  • accessToken: JWT
  • Optional idToken?: JWT

AuthUpdateAttributeStep

AuthUpdateAttributeStep: "CONFIRM_ATTRIBUTE_WITH_CODE" | "DONE"

Denotes the next step in the Update User Attribute process.

AuthUpdatePasswordInput

AuthUpdatePasswordInput: object

Constructs a updatePassword input.

param

previous password used for signIn

param

new password to be used for signIn

Type declaration

  • newPassword: string
  • oldPassword: string

AuthUpdateUserAttributeInput

AuthUpdateUserAttributeInput: object

Constructs a updateUserAttributes input.

param

the user attribute to be updated

param

optional parameters for the Update User Attributes process such as the service options.

Type declaration

  • Optional options?: ServiceOptions
  • userAttribute: AuthUserAttribute<UserAttributeKey>

AuthUpdateUserAttributeOutput

AuthUpdateUserAttributeOutput: object

Type declaration

AuthUpdateUserAttributesInput

AuthUpdateUserAttributesInput: object

Constructs a updateUserAttributes input.

param

the user attributes to be updated

param

optional parameters for the Update User Attributes process such as the service options.

Type declaration

AuthUpdateUserAttributesOutput

AuthUpdateUserAttributesOutput: object

Type declaration

AuthUserAgentInput

AuthUserAgentInput: object

Type declaration

AuthUserAttribute

AuthUserAttribute: object

The interface of a user attribute.

Type declaration

  • attributeKey: UserAttributeKey
  • value: string

AuthUserAttributeKey

A user attribute key type consisting of standard OIDC claims or custom attributes.

AuthUserAttributes

AuthUserAttributes: object

Key/value pairs describing a user attributes.

Type declaration

AuthUserPoolAndIdentityPoolConfig

AuthUserPoolAndIdentityPoolConfig: object

Type declaration

AuthUserPoolConfig

AuthUserPoolConfig: object

Type declaration

AuthVerifiableAttributeKey

AuthVerifiableAttributeKey: "email" | "phone_number"

AuthVerifyTOTPSetupInput

AuthVerifyTOTPSetupInput: object

Constructs a VerifyTOTPSetup input.

param

required parameter for verifying the TOTP setup.

param

optional parameters for the Verify TOTP Setup process such as the service options.

Type declaration

  • code: string
  • Optional options?: ServiceOptions

AuthorizationInfo

AuthorizationInfo: object

Type declaration

  • authMode: GraphQLAuthMode
  • isOwner: boolean
  • Optional ownerField?: string
  • Optional ownerValue?: string

AuthorizationRule

AuthorizationRule: object

Type declaration

  • areSubscriptionsPublic: boolean
  • authStrategy: "owner" | "groups" | "private" | "public"
  • groupClaim: string
  • groups: []
  • groupsField: string
  • identityClaim: string
  • ownerField: string
  • provider: "userPools" | "oidc" | "iam" | "apiKey"

AutoSignInCallback

AutoSignInCallback: function

Type declaration

AutoSignInEventData

AutoSignInEventData: object | object

AutoSignInSignUpStep

AutoSignInSignUpStep: object

Type declaration

BNP

BNP: object

Type declaration

  • s: number
  • t: number

BlockList

BlockList: Block[]

BooleanOperators

BooleanOperators: EqualityOperators<T>

BoundingBox

BoundingBox: []

Optional height

height: Number

Optional left

left: Number

Optional top

top: Number

Optional width

width: Number

BufferedEvent

BufferedEvent: object

Type declaration

BufferedEventMap

BufferedEventMap: object

Type declaration

ButtonAction

ButtonAction: object[keyof typeof ButtonAction]

BytesRangeOptions

BytesRangeOptions: object

Type declaration

  • Optional bytesRange?: object
    • end: number
    • start: number

CancellableTask

CancellableTask: DownloadTask<Result>

CategoryUserAgentStateMap

CategoryUserAgentStateMap: Record<string, object>

refCount tracks how many consumers have set state for a particular API to avoid it being cleared before all consumers are done using it.

Category -> Action -> Custom State

ChallengeName

ChallengeName: "SMS_MFA" | "SOFTWARE_TOKEN_MFA" | "SELECT_MFA_TYPE" | "MFA_SETUP" | "PASSWORD_VERIFIER" | "CUSTOM_CHALLENGE" | "DEVICE_SRP_AUTH" | "DEVICE_PASSWORD_VERIFIER" | "ADMIN_NO_SRP_AUTH" | "NEW_PASSWORD_REQUIRED"

ChallengeParameters

ChallengeParameters: object & object

ChannelType

ChannelType: Parameters<typeof updateEndpoint>[0]["channelType"]

ChecksumAlgorithm

ChecksumAlgorithm: object[keyof typeof ChecksumAlgorithm]

ChecksumMode

ChecksumMode: object[keyof typeof ChecksumMode]

Client

Client: V6Client<T>

ClientMetadata

ClientMetadata: object

Arbitrary key/value pairs that may be passed as part of certain Cognito requests

Type declaration

  • [key: string]: string

ClientOperation

ClientOperation: "SignUp" | "ConfirmSignUp" | "ForgotPassword" | "ConfirmForgotPassword" | "InitiateAuth" | "RespondToAuthChallenge" | "ResendConfirmationCode" | "VerifySoftwareToken" | "AssociateSoftwareToken" | "SetUserMFAPreference" | "GetUser" | "ChangePassword" | "ConfirmDevice" | "ForgetDevice" | "DeleteUser" | "GetUserAttributeVerificationCode" | "GlobalSignOut" | "UpdateUserAttributes" | "VerifyUserAttribute" | "DeleteUserAttributes" | "UpdateDeviceStatus" | "ListDevices" | "RevokeToken"

ClientUsingSSRCookies

ClientUsingSSRCookies: V6ClientSSRCookies<T>

ClientUsingSSRReq

ClientUsingSSRReq: V6ClientSSRRequest<T>

ClientWithModels

ClientWithModels: V6Client<Record<string, any>> | V6ClientSSRRequest<Record<string, any>> | V6ClientSSRCookies<Record<string, any>>

CodeDeliveryDetails

CodeDeliveryDetails: AuthCodeDeliveryDetails<CognitoUserAttributeKey>

Holds data describing the dispatch of a confirmation code.

CognitoAuthSignInDetails

CognitoAuthSignInDetails: object

Holds the sign in details of the user.

Type declaration

  • Optional authFlowType?: AuthFlowType
  • Optional loginId?: string

CognitoAuthTokens

CognitoAuthTokens: AuthTokens & object

CognitoIdentityPoolConfig

CognitoIdentityPoolConfig: object

Type declaration

  • Optional allowGuestAccess?: boolean
  • identityPoolId: string

CognitoMFASettings

CognitoMFASettings: object

Type declaration

  • Optional Enabled?: boolean
  • Optional PreferredMfa?: boolean

CognitoMFAType

CognitoMFAType: "SMS_MFA" | "SOFTWARE_TOKEN_MFA"

CognitoProviderConfig

CognitoUserPoolAndIdentityPoolConfig

CognitoUserPoolAndIdentityPoolConfig: CognitoUserPoolConfig & CognitoIdentityPoolConfig

CognitoUserPoolConfig

CognitoUserPoolConfig: object

Type declaration

  • Optional loginWith?: object
    • Optional email?: boolean
    • Optional oauth?: OAuthConfig
    • Optional phone?: boolean
    • Optional username?: boolean
  • Optional mfa?: object
    • Optional smsEnabled?: boolean
    • Optional status?: "on" | "off" | "optional"
    • Optional totpEnabled?: boolean
  • Optional passwordFormat?: object
    • Optional minLength?: number
    • Optional requireLowercase?: boolean
    • Optional requireNumbers?: boolean
    • Optional requireSpecialCharacters?: boolean
    • Optional requireUppercase?: boolean
  • Optional signUpVerificationMethod?: "code" | "link"
  • Optional userAttributes?: AuthConfigUserAttributes
  • userPoolClientId: string
  • Optional userPoolEndpoint?: string
  • userPoolId: string

CognitoUserPoolWithOAuthConfig

CognitoUserPoolWithOAuthConfig: CognitoUserPoolConfig & object

CommonOptions

CommonOptions: object

Type declaration

  • Optional useAccelerateEndpoint?: boolean

    Whether to use accelerate endpoint.

    default

    false

CommonPublicClientOptions

CommonPublicClientOptions: object

Common options that can be used on public generateClient() interfaces.

Type declaration

  • Optional authMode?: GraphQLAuthMode
  • Optional authToken?: string
  • Optional headers?: CustomHeaders

CompatibleHttpResponse

CompatibleHttpResponse: Omit<HttpResponse, "body"> & object

Compatible type for S3 streaming body exposed via Amplify public interfaces, like GetObjectCommandOutput exposed via download API. It's also compatible with the custom transfer handler interface HttpResponse.body.

internal

CompleteMultipartUploadInput

CompleteMultipartUploadInput: Pick<CompleteMultipartUploadCommandInput, "Bucket" | "Key" | "UploadId" | "MultipartUpload">

CompositeIdentifier

CompositeIdentifier: IdentifierBrand<object, "CompositeIdentifier">

ConcurrentUploadsProgressTrackerOptions

ConcurrentUploadsProgressTrackerOptions: object

Type declaration

ConditionProducer

ConditionProducer: function

Type declaration

    • (...args: A): A["length"] extends keyof Lookup<T> ? Lookup<T>[A["length"]] : never
    • Parameters

      • Rest ...args: A

      Returns A["length"] extends keyof Lookup<T> ? Lookup<T>[A["length"]] : never

ConfigureAutoTrackInput

ConfigureAutoTrackInput: AnalyticsConfigureAutoTrackInput

Input type for Pinpoint configureAutoTrack API.

ConfiguredMiddleware

ConfiguredMiddleware: function

Type declaration

ConfirmResetPasswordInput

Input type for Cognito confirmResetPassword API.

ConfirmResetPasswordOptions

ConfirmResetPasswordOptions: AuthServiceOptions & object

Options specific to Cognito Confirm Reset Password.

ConfirmSignInInput

Input type for Cognito confirmSignIn API.

ConfirmSignInOptions

ConfirmSignInOptions: AuthServiceOptions & object

Options specific to Cognito Confirm Sign In.

ConfirmSignInOutput

ConfirmSignInOutput: AuthSignInOutput

Output type for Cognito confirmSignIn API.

ConfirmSignInWithCustomChallenge

ConfirmSignInWithCustomChallenge: object

Type declaration

  • Optional additionalInfo?: AuthAdditionalInfo
  • signInStep: "CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE"

    Auth step requires user to respond to a custom challenge.

    example
    const challengeAnswer = 'my-custom-response';
    await confirmSignIn({challengeResponse: challengeAnswer});

ConfirmSignInWithNewPasswordRequired

ConfirmSignInWithNewPasswordRequired: object

Type declaration

  • Optional missingAttributes?: UserAttributeKey[]
  • signInStep: "CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED"

    Auth step requires user to change their password with any required attributes.

    example
    const attributes = {
     email: 'email@email'
     phone_number: '+11111111111'
    };
    const newPassword = 'my-new-password';
    await confirmSignIn({
     challengeResponse: newPassword,
     options: {
       userAttributes: attributes
      }
    });

ConfirmSignInWithSMSCode

ConfirmSignInWithSMSCode: object

Type declaration

  • Optional codeDeliveryDetails?: AuthCodeDeliveryDetails
  • signInStep: "CONFIRM_SIGN_IN_WITH_SMS_CODE"

    Auth step requires user to use SMS as multifactor authentication by retrieving a code sent to cellphone.

    example
    // Code retrieved from cellphone
    const smsCode = '112233'
    await confirmSignIn({challengeResponse: smsCode})

ConfirmSignInWithTOTPCode

ConfirmSignInWithTOTPCode: object

Type declaration

  • signInStep: "CONFIRM_SIGN_IN_WITH_TOTP_CODE"

    Auth step requires user to use TOTP as multifactor authentication by retriving an OTP code from authenticator app.

    example
    // Code retrieved from authenticator app
    const otpCode = '112233';
    await confirmSignIn({challengeResponse: otpCode});

ConfirmSignUpInput

Input type for Cognito confirmSignUp API.

ConfirmSignUpOptions

ConfirmSignUpOptions: AuthServiceOptions & object

Options specific to Cognito Confirm Sign Up.

ConfirmSignUpOutput

Output type for Cognito confirmSignUp API.

ConfirmSignUpSignUpStep

ConfirmSignUpSignUpStep: object

Type declaration

ConfirmSignUpStep

ConfirmSignUpStep: object

Type declaration

  • signInStep: "CONFIRM_SIGN_UP"

    Auth step requires to confirm user's sign-up.

    Try calling confirmSignUp.

ConfirmUserAttributeInput

Input type for Cognito confirmUserAttribute API.

ConflictHandler

ConflictHandler: function

Type declaration

ConnectionStatus

ConnectionStatus: object

Type declaration

  • online: boolean

ContinueSignInWithMFASelection

ContinueSignInWithMFASelection: object

Type declaration

  • Optional allowedMFATypes?: AuthAllowedMFATypes
  • signInStep: "CONTINUE_SIGN_IN_WITH_MFA_SELECTION"

    Auth step requires user to select an mfa option (SMS | TOTP) to continue with the sign-in flow.

    example
    await confirmSignIn({challengeResponse:'TOTP'});
    // OR
    await confirmSignIn({challengeResponse:'SMS'});

ContinueSignInWithTOTPSetup

ContinueSignInWithTOTPSetup: object

Type declaration

  • signInStep: "CONTINUE_SIGN_IN_WITH_TOTP_SETUP"

    Auth step requires user to set up TOTP as multifactor authentication by associating an authenticator app and retrieving an OTP code.

    example
    // Code retrieved from authenticator app
    const otpCode = '112233';
    await confirmSignIn({challengeResponse: otpCode});
  • totpSetupDetails: AuthTOTPSetupDetails

ControlMessageType

ControlMessageType: object

Type declaration

  • Optional data?: any
  • type: T

ConvertBytes

ConvertBytes: __type | ArrayBuffer | string

ConvertConfig

ConvertConfig: object

Type declaration

CookieStorageData

CookieStorageData: object

Type declaration

  • Optional domain?: string
  • Optional expires?: number

    Expiration in days

  • Optional path?: string
  • Optional sameSite?: SameSite
  • Optional secure?: boolean

CookiesClientParams

CookiesClientParams: object

Type declaration

  • Optional authMode?: GraphQLAuthMode
  • Optional authToken?: string
  • config: CreateServerRunnerInput["config"]
  • cookies: NextServer.ServerComponentContext["cookies"]

Coordinates

Coordinates: []

CopyDestinationOptions

CopyDestinationOptions: WriteOptions & object

CopyInput

Input type for S3 copy API.

CopyObjectInput

CopyObjectInput: Pick<CopyObjectCommandInput, "Bucket" | "CopySource" | "Key" | "MetadataDirective" | "CacheControl" | "ContentType" | "ContentDisposition" | "ContentLanguage" | "Expires" | "ACL" | "Tagging" | "Metadata">

CopyOutput

CopyOutput: Pick<Item, "key">

Output type for S3 copy API.

CopySourceOptions

CopySourceOptions: ReadOptions & object

CreateCancellableTaskOptions

CreateCancellableTaskOptions: object

Type declaration

  • job: function
  • onCancel: function
      • (message?: string): void
      • Parameters

        • Optional message: string

        Returns void

CreateMultipartUploadInput

CreateMultipartUploadInput: Extract<CreateMultipartUploadCommandInput, PutObjectInput>

CreateUploadTaskOptions

CreateUploadTaskOptions: object

Type declaration

  • Optional isMultipartUpload?: boolean
  • job: function
  • onCancel: function
      • (message?: string): void
      • Parameters

        • Optional message: string

        Returns void

  • Optional onPause?: function
      • (): void
      • Returns void

  • Optional onResume?: function
      • (): void
      • Returns void

CredentialsAndIdentityId

CredentialsAndIdentityId: object

Type declaration

CustomAttribute

CustomAttribute: string & object

Cognito custom attribute type

CustomIdentifier

CustomIdentifier: CompositeIdentifier<T, []>

CustomProvider

CustomProvider: object

Type declaration

  • custom: string

CustomScope

CustomScope: string & object

CustomUserAgentDetails

CustomUserAgentDetailsBase

CustomUserAgentDetailsBase: object

Type declaration

CustomUserAgentStateMap

CustomUserAgentStateMap: Record<string, CategoryUserAgentStateMap>

DOMEvent

DOMEvent: keyof GlobalEventHandlersEventMap

DailyInAppMessageCounter

DailyInAppMessageCounter: object

Type declaration

  • count: number
  • lastCountTimestamp: string

DataObject

DataObject: object

Type declaration

  • data: Record<string, unknown>

DataPayload

DataPayload: object

Type declaration

DataStoreConfig

DataStoreConfig: object

Type declaration

DataStoreSnapshot

DataStoreSnapshot: object

Type declaration

  • isSynced: boolean
  • items: T[]

DateUtils

DateUtils: object

Type declaration

  • clockOffset: number
  • getClockOffset: function
      • (): number
      • Returns number

  • getDateFromHeaderString: function
      • (header: string): Date
      • Parameters

        • header: string

        Returns Date

  • getDateWithClockOffset: function
      • (): Date
      • Returns Date

  • getHeaderStringFromDate: function
      • (date: Date): string
      • Parameters

        • date: Date

        Returns string

  • isClockSkewError: function
      • (error: any): boolean
      • Parameters

        • error: any

        Returns boolean

  • isClockSkewed: function
      • (serverDate: Date): boolean
      • Parameters

        • serverDate: Date

        Returns boolean

  • setClockOffset: function
      • (offset: number): void
      • Parameters

        • offset: number

        Returns void

DeepWritable

DeepWritable: object

Type declaration

DefaultPersistentModelMetaData

DefaultPersistentModelMetaData: object

Type declaration

DeferredCallbackResolverOptions

DeferredCallbackResolverOptions: object

Type declaration

  • callback: function
      • (): void
      • Returns void

  • Optional errorHandler?: function
      • (error: string): void
      • Parameters

        • error: string

        Returns void

  • Optional maxInterval?: number

DelayFunction

DelayFunction: function
internal

Type declaration

    • (attempt: number, args?: any[], error?: unknown): number | false
    • Parameters

      • attempt: number
      • Optional args: any[]
      • Optional error: unknown

      Returns number | false

DeleteGeofencesResults

DeleteGeofencesResults: object

Type declaration

DeleteInput

DeleteInput: ApiInput<Omit<RestApiOptionsBase, "body">>

DeleteObjectInput

DeleteObjectInput: Pick<DeleteObjectCommandInput, "Bucket" | "Key">

DeleteOperation

DeleteOperation: Operation<Omit<RestApiResponse, "body">>

DeleteUserAttributesInput

Input type for Cognito deleteUserAttributes API.

DetectParams

DetectParams: object

Type declaration

  • LanguageCode: string
  • Text: string

DeviceMetadata

DeviceMetadata: object

Type declaration

  • Optional deviceGroupKey?: string
  • Optional deviceKey?: string
  • randomPassword: string

DimensionType

DimensionType: object[keyof typeof DimensionType]

DispatchEventInput

DispatchEventInput: InAppMessagingEvent

Input type for Pinpoint dispatchEvent API.

DocumentType

DocumentType: null | boolean | number | string | DocumentType[] | object

Type representing a plain JavaScript object that can be serialized to JSON.

DoneSignInStep

DoneSignInStep: object

Type declaration

  • signInStep: "DONE"

    The sign-in process is complete.

    No further action is needed.

DoneSignUpStep

DoneSignUpStep: object

Type declaration

  • signUpStep: "DONE"

DownloadDataInput

Input type for S3 downloadData API.

DownloadDataOptions

Input options type for S3 downloadData API.

DownloadDataOutput

Output type for S3 downloadData API.

DownloadTask

DownloadTask: Omit<TransferTask<Result>, "pause" | "resume">

EncodingType

EncodingType: object[keyof typeof EncodingType]

EndpointResolverOptions

EndpointResolverOptions: object

Basic option type for endpoint resolvers. It contains region only.

Type declaration

  • region: string

EntityAgeRange

EntityAgeRange: object

Type declaration

  • Optional high?: Number
  • Optional low?: Number

EntityLandmark

EntityLandmark: object

Type declaration

  • Optional type?: string
  • Optional x?: number
  • Optional y?: number

EntityMetadata

EntityMetadata: object

Type declaration

  • Optional confidence?: number
  • Optional externalImageId?: string
  • Optional id?: string
  • Optional name?: string
  • Optional pose?: object
    • Optional pitch?: number
    • Optional roll?: number
    • Optional yaw?: number
  • Optional similarity?: number
  • Optional urls?: string[]

EnumFieldType

EnumFieldType: object

Type declaration

  • enum: string

EqualityOperators

EqualityOperators: object

Type declaration

  • eq: T
  • ne: T

ErrorHandler

ErrorHandler: function

Type declaration

ErrorMap

ErrorMap: Partial<object>

ErrorObject

ErrorObject: object

Type declaration

ErrorParser

ErrorParser: function

parse errors from given response. If no error code is found, return undefined. This function is protocol-specific (e.g. JSON, XML, etc.)

Type declaration

ErrorType

ErrorType: "ConfigError" | "BadModel" | "BadRecord" | "Unauthorized" | "Transient" | "Unknown"

EventBufferConfig

EventBufferConfig: object

Type declaration

  • bufferSize: number
  • flushInterval: number
  • flushSize: number
  • resendLimit: number

EventDataMap

EventDataMap: object

Type declaration

  • Optional data?: unknown
  • event: string

EventListenerRemover

EventListenerRemover: object

Type declaration

  • remove: function
      • (): void
      • Returns void

EventTrackingOptions

EventTrackingOptions: object

Type declaration

EventType

ExcludeNeverFields

ExcludeNeverFields: object

Type declaration

FcmMessage

FcmMessage: object

Type declaration

  • Optional action?: NativeAction
  • Optional aps?: never
  • Optional body?: string
  • Optional channelId?: string
  • Optional completionHandlerId?: never
  • Optional imageUrl?: string
  • Optional messageId?: string
  • Optional rawData?: Record<string, unknown>
  • Optional sendTime?: number
  • Optional senderId?: string
  • Optional title?: string

FeatureType

FeatureType: "TABLES" | "FORMS" | string

FeatureTypes

FeatureTypes: FeatureType[]

FetchAuthSessionOptions

FetchAuthSessionOptions: object

Type declaration

  • Optional forceRefresh?: boolean

FetchDevicesOutput

FetchDevicesOutput: AWSAuthDevice[]

Output type for Cognito fetchDevices API.

FetchMFAPreferenceOutput

FetchMFAPreferenceOutput: object

Type declaration

FetchUserAttributesOutput

FetchUserAttributesOutput: AuthUserAttributes<UserAttributeKey>

Output type for Cognito fetchUserAttributes API.

Field

Field: object

Type declaration

  • Optional association?: AssociationType
  • Optional attributes?: FieldAttribute[]
  • isArray: boolean
  • Optional isArrayNullable?: boolean
  • Optional isReadOnly?: boolean
  • isRequired: boolean
  • name: string
  • type: FieldType

FieldAssociation

FieldAssociation: object

Type declaration

  • connectionType: "HAS_ONE" | "BELONGS_TO" | "HAS_MANY"

FieldAttribute

FieldAttribute: ModelAttribute

FieldType

FieldType: "ID" | "String" | "Int" | "Float" | "AWSDate" | "AWSTime" | "AWSDateTime" | "AWSTimestamp" | "AWSEmail" | "AWSURL" | "AWSIPAddress" | "Boolean" | "AWSJSON" | "AWSPhone" | object | ModelFieldType | object

Fields

Fields: Record<string, Field>

Field Definition

FileMetadata

FileMetadata: object

Type declaration

  • bucket: string
  • fileName: string
  • key: string
  • lastTouched: number
  • uploadId: string

FilterType

FilterType: object[keyof typeof FilterType]

FilteredKeys

FilteredKeys: object[keyof T]

FindCachedUploadPartsOptions

FindCachedUploadPartsOptions: object

Type declaration

FixedQueryResult

FixedQueryResult: Exclude<T[keyof T], null | undefined> extends PagedList<any, any> ? object : T

Replaces all list result types in a query result with types to exclude nulls and undefined from list member unions.

If empty members are present, there will also be errors present, and the response will instead be thrown.

ForgetDeviceInput

ForgetDeviceInput: AuthForgetDeviceInput

Input type for Cognito forgetDevice API.

GenerateServerClientParams

GenerateServerClientParams: object

Type declaration

GeneratedMutation

GeneratedMutation: string & object

Nominal type for branding generated graphql mutation operation strings with input and output types.

E.g.,

export const createWidget = `...` as GeneratedQuery<
    CreateWidgetMutationVariables,
    CreateWidgetMutation
>;

This allows graphql() to extract InputType and OutputType to correctly assign types to the variables and result objects.

GeneratedQuery

GeneratedQuery: string & object

Nominal type for branding generated graphql query operation strings with input and output types.

E.g.,

export const getWidget = `...` as GeneratedQuery<
    GetWidgetQueryVariables,
    GetWidgetQuery
>;

This allows graphql() to extract InputType and OutputType to correctly assign types to the variables and result objects.

GeneratedSubscription

GeneratedSubscription: string & object

Nominal type for branding generated graphql mutation operation strings with input and output types.

E.g.,

export const createWidget = `...` as GeneratedMutation<
    CreateWidgetMutationVariables,
    CreateWidgetMutation
>;

This allows graphql() to extract InputType and OutputType to correctly assign types to the variables and result objects.

GeoConfig

GeoUserAgentInput

GeoUserAgentInput: object

Type declaration

Geofence

Geofence: GeofenceBase & object

GeofenceBase

GeofenceBase: object

Type declaration

  • Optional createTime?: Date
  • geofenceId: GeofenceId
  • Optional updateTime?: Date

GeofenceError

GeofenceError: object

Type declaration

  • error: object
    • code: string
    • message: string
  • geofenceId: GeofenceId

GeofenceId

GeofenceId: string

GeofenceInput

GeofenceInput: object

Type declaration

GeofenceOptions

GeofenceOptions: object

Type declaration

  • Optional providerName?: string

GeofencePolygon

GeofencePolygon: LinearRing[]

GetBadgeCount

GetBadgeCount: function

Type declaration

GetBadgeCountOutput

GetCredentialsAuthenticatedUser

GetCredentialsAuthenticatedUser: object

Type declaration

  • authConfig: AuthConfig | undefined
  • authenticated: true
  • Optional forceRefresh?: boolean
  • tokens: AuthTokens

GetCredentialsOptions

GetCredentialsUnauthenticatedUser

GetCredentialsUnauthenticatedUser: object

Type declaration

  • authConfig: AuthConfig | undefined
  • authenticated: false
  • Optional forceRefresh?: boolean
  • Optional tokens?: never

GetCurrentUserOutput

GetCurrentUserOutput: AuthUser

Output type for Cognito getCurrentUser API.

GetEventBufferInput

GetEventBufferInput: EventBufferConfig & object

GetInput

GetLaunchNotification

GetLaunchNotification: function

GetLaunchNotificationOutput

GetLaunchNotificationOutput: PushNotificationGetLaunchNotificationOutput

GetObjectInput

GetObjectInput: Pick<GetObjectCommandInput, "Bucket" | "Key" | "Range">

GetOperation

GetOperation: Operation<RestApiResponse>

GetPermissionStatus

GetPermissionStatus: function

GetPermissionStatusOutput

GetPropertiesInput

Input type for S3 getProperties API.

GetPropertiesOptions

GetPropertiesOptions: ReadOptions & CommonOptions

Input options type for S3 getProperties API.

GetPropertiesOutput

GetPropertiesOutput: Item

Output type for S3 getProperties API.

GetUrlInput

Input type for S3 getUrl API.

GetUrlOptions

GetUrlOptions: ReadOptions & CommonOptions & object

Input options type for S3 getUrl API.

GetUrlOutput

GetUrlOutput: StorageGetUrlOutput

Output type for S3 getUrl API.

GraphQLAuthMode

GraphQLAuthMode: "apiKey" | "oidc" | "userPool" | "iam" | "lambda" | "none"

GraphQLCondition

GraphQLCondition: Partial<GraphQLField | object>

GraphQLConfig

GraphQLConfig: Exclude<ResourcesConfig["API"], undefined>["GraphQL"]

GraphQLField

GraphQLField: object

Type declaration

  • [field: string]: object
    • [operator: string]: string | number | []

GraphQLFilter

GraphQLFilter: Partial<GraphQLField | object | object | object>

GraphQLMethod

GraphQLMethod: function

Type declaration

    • <FALLBACK_TYPES, TYPED_GQL_STRING>(options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>, additionalHeaders?: CustomHeaders | undefined): GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING>
    • Type parameters

      • FALLBACK_TYPES

      • TYPED_GQL_STRING: string

      Parameters

      • options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>
      • Optional additionalHeaders: CustomHeaders | undefined

      Returns GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING>

GraphQLMethodSSR

GraphQLMethodSSR: function

Type declaration

    • <FALLBACK_TYPES, TYPED_GQL_STRING>(contextSpec: ContextSpec, options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>, additionalHeaders?: CustomHeaders | undefined): GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING>
    • Type parameters

      • FALLBACK_TYPES

      • TYPED_GQL_STRING: string

      Parameters

      • contextSpec: ContextSpec
      • options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>
      • Optional additionalHeaders: CustomHeaders | undefined

      Returns GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING>

GraphQLOperation

GraphQLOperation: Source | string

GraphQLSource or string, the type of the parameter for calling graphql.parse

see:

https://graphql.org/graphql-js/language/#parse

GraphQLProviderConfig

GraphQLProviderConfig: object

Type declaration

GraphQLQuery

GraphQLQuery: T & object

GraphQLResponseV6

GraphQLResponseV6: TYPED_GQL_STRING extends GeneratedQuery<infer IN, infer QUERY_OUT> ? Promise<GraphQLResult<FixedQueryResult<QUERY_OUT>>> : TYPED_GQL_STRING extends GeneratedMutation<infer IN, infer MUTATION_OUT> ? Promise<GraphQLResult<NeverEmpty<MUTATION_OUT>>> : TYPED_GQL_STRING extends GeneratedSubscription<infer IN, infer SUB_OUT> ? GraphqlSubscriptionResult<NeverEmpty<SUB_OUT>> : FALLBACK_TYPE extends GraphQLQuery<infer T> ? Promise<GraphQLResult<FALLBACK_TYPE>> : FALLBACK_TYPE extends GraphQLSubscription<infer T> ? GraphqlSubscriptionResult<FALLBACK_TYPE> : FALLBACK_TYPE extends GraphQLOperationType<infer IN, infer CUSTOM_OUT> ? CUSTOM_OUT : UnknownGraphQLResponse

The expected return type with respect to the given FALLBACK_TYPE and TYPED_GQL_STRING.

GraphQLReturnType

GraphQLReturnType: T extends object ? object : T

Accepts a code generated model type and returns a supertype that can accept return values from the relevant graphql operations.

For example:

import { GraphQLReturnType } from 'aws-amplify/api';
import { MyModel } from './API';
import { getMyModel } from './graphql/queries';

const [item, setItem] = useState<GraphQLReturnType<MyModel>>();
setItem(await client.graphql({ query: getMyModel }).data.getMyModel!)

Trying to assign the result of a getMyModel operation directly to a MyModel variables won't necessarily work, because normally-required related models might not be part of the selection set.

This util simply makes related model properties optional recursively.

GraphQLSubscription

GraphQLSubscription: T & object

GraphQLVariablesV6

GraphQLVariablesV6: TYPED_GQL_STRING extends GeneratedQuery<infer IN, any> ? IN : TYPED_GQL_STRING extends GeneratedMutation<infer IN, any> ? IN : TYPED_GQL_STRING extends GeneratedSubscription<infer IN, any> ? IN : FALLBACK_TYPES extends GraphQLOperationType<infer IN, any> ? IN : any

The expected type for variables in a V6 graphql() operation with respect to the given FALLBACK_TYPES and TYPED_GQL_STRING.

GraphqlSubscriptionMessage

GraphqlSubscriptionMessage: object

The shape of messages passed to next() from a graphql subscription. E.g.,

const sub = client.graphql({
    query: onCreateWidget,
}).subscribe({
    //
    //            |-- You are here
    //            v
    next(message: GraphqlSubscriptionMessage<OnCreateWidgetSubscription>) {
        handle(message.value);  // <-- type OnCreateWidgetSubscription
    }
})

Type declaration

  • data: T

GraphqlSubscriptionResult

GraphqlSubscriptionResult: Observable<GraphqlSubscriptionMessage<T>>

The return value from a graphql({query}) call when query is a subscription.

//               |-- You are here
//               v
const subResult: GraphqlSubscriptionResult<T> = client.graphql({
    query: onCreateWidget
});

const sub = subResult.subscribe({
    //
    //            |-- You are here
    //            v
    next(message: GraphqlSubscriptionMessage<OnCreateWidgetSubscription>) {
        handle(message.value);  // <-- type OnCreateWidgetSubscription
    }
})

GroupOperator

GroupOperator: "and" | "or" | "not"

HandleAuthChallengeRequest

HandleAuthChallengeRequest: object

Type declaration

HandleDeviceSRPInput

HandleDeviceSRPInput: object

Type declaration

HandlerOptions

HandlerOptions: Omit<HttpRequest, "body" | "headers"> & object

HeadInput

HeadInput: ApiInput<Omit<RestApiOptionsBase, "body">>

HeadObjectInput

HeadObjectInput: Pick<HeadObjectCommandInput, "Bucket" | "Key">

HeadOperation

HeadOperation: Operation<Omit<RestApiResponse, "body">>

Headers

Headers: Record<string, string>

Use basic Record interface to workaround fetch Header class not available in Node.js The header names must be lowercased. TODO: use LowerCase intrinsic when we can support typescript 4.0

HttpTransferHandler

HubCallback

HubCallback: function

Type declaration

    • Parameters

      Returns void

HubCapsule

HubCapsule: object

Type declaration

  • channel: Channel
  • Optional patternInfo?: string[]
  • payload: HubPayload<EventData>
  • Optional source?: string

HubPayload

HubPayload: EventData & object

IListener

IListener: object[]

Identifier

Identifier: ManagedIdentifier<T, any> | OptionallyManagedIdentifier<T, any> | CompositeIdentifier<T, any> | CustomIdentifier<T, any>

IdentifierBrand

IdentifierBrand: T & object

IdentifierFieldOrIdentifierObject

IdentifierFieldOrIdentifierObject: Pick<T, IdentifierFields<T, M>> | IdentifierFieldValue<T, M>

IdentifierFieldValue

IdentifierFieldValue: MetadataOrDefault<T, M>["identifier"] extends CompositeIdentifier<T, any> ? MetadataOrDefault<T, M>["identifier"]["fields"] extends [] ? T[MetadataOrDefault<T, M>["identifier"]["fields"][0]] : never : T[MetadataOrDefault<T, M>["identifier"]["field"]]

IdentifierFields

IdentifierFields: string

IdentifierFieldsForInit

IdentifierFieldsForInit: MetadataOrDefault<T, M>["identifier"] extends DefaultPersistentModelMetaData | ManagedIdentifier<T, any> ? never : MetadataOrDefault<T, M>["identifier"] extends OptionallyManagedIdentifier<T, any> ? IdentifierFields<T, M> : MetadataOrDefault<T, M>["identifier"] extends CompositeIdentifier<T, any> ? IdentifierFields<T, M> : never

IdentifyBytes

IdentifyBytes: ConvertBytes | Blob

IdentifyConfig

IdentifyConfig: object

Type declaration

IdentifyEntitiesDefaults

IdentifyEntitiesDefaults: object

Type declaration

  • Optional collectionId?: string
  • Optional maxEntities?: number

IdentifyEntity

IdentifyEntity: object

Type declaration

IdentifySource

IdentifyTextDefaults

IdentifyTextDefaults: object

Type declaration

  • Optional format?: string

IdentifyUser

IdentifyUser: function

Type declaration

IdentifyUserInput

Input type for Pinpoint identifyUser API. Input type for Pinpoint identifyUser API.

IdentifyUserOptions

IdentifyUserOptions: PinpointServiceOptions

Options specific to Pinpoint identityUser. Options specific to Pinpoint identityUser. Options specific to Pinpoint identityUser.

Identity

Identity: object

Type declaration

  • id: string
  • type: "guest" | "primary"

IdentityLabelsDefaults

IdentityLabelsDefaults: object

Type declaration

  • Optional type?: string

InAppMessageAction

InAppMessageAction: "CLOSE" | "DEEP_LINK" | "LINK"

InAppMessageConflictHandler

InAppMessageConflictHandler: function

Type declaration

    • (messages: InAppMessage[]): InAppMessage
    • Parameters

      • messages: InAppMessage[]

      Returns InAppMessage

InAppMessageCountMap

InAppMessageCountMap: Record<string, number>

InAppMessageCounts

InAppMessageCounts: object

Type declaration

  • dailyCount: number
  • sessionCount: number
  • totalCount: number

InAppMessageInteractionEvent

InAppMessageInteractionEvent: "messageReceived" | "messageDisplayed" | "messageDismissed" | "messageActionTaken"

InAppMessageLayout

InAppMessageLayout: "BOTTOM_BANNER" | "CAROUSEL" | "FULL_SCREEN" | "MIDDLE_BANNER" | "MODAL" | "TOP_BANNER"

InAppMessageTextAlign

InAppMessageTextAlign: "center" | "left" | "right"

InAppMessagingConfig

InAppMessagingConfig: PinpointProviderConfig

InAppMessagingEvent

InAppMessagingEvent: object

Type declaration

  • Optional attributes?: Record<string, string>
  • Optional metrics?: Record<string, number>
  • name: string

InAppMessagingIdentifyUserInput

InAppMessagingIdentifyUserInput: object

Input type for identifyUser.

Type declaration

  • Optional options?: ServiceOptions

    Options to be passed to the API.

  • userId: string

    A User ID associated to the current device.

  • userProfile: UserProfile

    Additional information about the user and their device.

InAppMessagingProviderConfig

InAppMessagingProviderConfig: object

Type declaration

InAppMessagingServiceOptions

InAppMessagingServiceOptions: Record<string, unknown>

Base type for service options.

InAppMessagingUserAgentInput

InAppMessagingUserAgentInput: object

Type declaration

IndexOptions

IndexOptions: object

Type declaration

  • Optional unique?: boolean

IndexesType

IndexesType: Array<[]>

InferEndpointResolverOptionType

InferEndpointResolverOptionType: T extends object ? EndpointOptions : never

InferInstructionResultType

InferInstructionResultType: never

InferOptionTypeFromTransferHandler

InferOptionTypeFromTransferHandler: Parameters<T>[1]

Type to infer the option type of a transfer handler type.

InitializePushNotifications

InitializePushNotifications: function

Type declaration

    • (): void
    • Returns void

Instruction

InteractionsConfig

InteractionsLexV1Config

InteractionsLexV1Config: object

Type declaration

InteractionsLexV2Config

InteractionsLexV2Config: object

Type declaration

InteractionsMessage

InteractionsOnCompleteCallback

InteractionsOnCompleteCallback: function

Type declaration

InteractionsOnCompleteInput

InteractionsOnCompleteInput: object

Type declaration

InteractionsResponse

InteractionsResponse: object

Type declaration

  • [key: string]: any

InteractionsSendInput

InteractionsSendInput: object

Type declaration

InteractionsSendOutput

InteractionsSendOutput: InteractionsResponse

InteractionsTextMessage

InteractionsTextMessage: object

Type declaration

  • content: string
  • options: object
    • messageType: "text"

InteractionsVoiceMessage

InteractionsVoiceMessage: object

Type declaration

  • content: object
  • options: object
    • messageType: "voice"

InternalPostInput

InternalPostInput: object

Input type to invoke REST POST API from GraphQl client.

internal

Type declaration

  • Optional abortController?: AbortController

    The abort controller to cancel the in-flight POST request. Required if you want to make the internal post request cancellable. To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller.

  • Optional options?: RestApiOptionsBase & object
  • url: __type

InternalSchema

InternalSchema: object

Type declaration

InternalSubscriptionMessage

InternalSubscriptionMessage: object

Type declaration

InterpretConfig

InterpretConfig: object

Type declaration

InterpretTextCategories

InterpretTextCategories: "all" | "language" | "entities" | "sentiment" | "syntax" | "keyPhrases"

Convert types

InterpretTextDefaults

InterpretTextDefaults: object

Type declaration

  • Optional type?: string

IosPermissionStatus

IosPermissionStatus: "NotDetermined" | "Authorized" | "Denied"

IsResponse

IsResponse: object

Type declaration

  • $metadata: any

JWT

JWT: object

Type declaration

  • payload: JwtPayload
  • toString: function
      • (): string
      • Returns string

JWTCreator

JWTCreator: function

Type declaration

    • (stringJWT: string): JWT
    • Parameters

      • stringJWT: string

      Returns JWT

JobEntry

JobEntry: object

Completely internal to BackgroundProcessManager, and describes the structure of an entry in the jobs registry.

Type declaration

  • Optional description?: string

    An object provided by the caller that can be used to identify the description of the job, which can otherwise be unclear from the promise and terminate function. The description can be a string. (May be extended later to also support object refs.)

    Useful for troubleshooting why a manager is waiting for long periods of time on close().

  • promise: Promise<any>

    The underlying promise provided by the job function to wait for.

  • terminate: function

    Request the termination of the job.

      • (): void
      • Returns void

Json

Json: null | string | number | boolean | Json[] | JsonObject

JSON type

JsonObject

JsonObject: object

JSON Object type

Type declaration

  • [name: string]: Json

JwtPayload

KeyPhrase

KeyPhrase: object

Type declaration

  • Optional text?: string

KeyPhrases

KeyPhrases: KeyPhrase[]

KeyType

KeyType: object

Type declaration

  • Optional compositeKeys?: Set<string>[]
  • Optional primaryKey?: string[]

KeysOfSuperType

KeysOfSuperType: object[keyof T]

KeysOfType

KeysOfType: object[keyof T]

KinesisBufferEvent

KinesisBufferEvent: KinesisShard & object

KinesisEventBufferConfig

KinesisEventBufferConfig: EventBufferConfig & object

KinesisEventData

KinesisEventData: Record<string, unknown> | Uint8Array

KinesisFirehoseBufferEvent

KinesisFirehoseBufferEvent: KinesisStream & object

KinesisFirehoseEventBufferConfig

KinesisFirehoseEventBufferConfig: EventBufferConfig & object

KinesisFirehoseProviderConfig

KinesisFirehoseProviderConfig: object

Type declaration

  • KinesisFirehose: object
    • Optional bufferSize?: number
    • Optional flushInterval?: number
    • Optional flushSize?: number
    • region: string
    • Optional resendLimit?: number

KinesisProviderConfig

KinesisProviderConfig: object

Type declaration

  • Kinesis: object
    • Optional bufferSize?: number
    • Optional flushInterval?: number
    • Optional flushSize?: number
    • region: string
    • Optional resendLimit?: number

KinesisShard

KinesisShard: KinesisStream & object

KinesisStream

KinesisStream: object

Type declaration

  • region: string
  • streamName: string

Latitude

Latitude: number

Layout

Layout: object[keyof typeof Layout]

LazyLoadOptions

LazyLoadOptions: object

Type declaration

  • Optional authMode?: GraphQLAuthMode
  • Optional authToken?: string | undefined
  • Optional headers?: CustomHeaders | undefined
  • Optional limit?: number | undefined
  • Optional nextToken?: string | undefined | null

LegacyConfig

LegacyConfig: object

Type declaration

  • Optional aws_project_region?: string
    deprecated

    The field should not be used.

LegacyUserAttributeKey

LegacyUserAttributeKey: Uppercase<AuthStandardAttributeKey>

LibraryAPIOptions

LibraryAPIOptions: object

Type declaration

  • Optional GraphQL?: object
    • Optional headers?: function
    • Optional withCredentials?: boolean
  • Optional REST?: object

LibraryAuthOptions

LibraryAuthOptions: object

Type declaration

LibraryOptions

LibraryOptions: object

Type declaration

LinearRing

LinearRing: Coordinates[]

LinkedConnectionState

LinkedConnectionState: "connected" | "disconnected"

LinkedConnectionStates

LinkedConnectionStates: object

Type declaration

LinkedHealthState

LinkedHealthState: "healthy" | "unhealthy"

ListAllInput

Input type for S3 list API. Lists all bucket objects.

ListAllOptions

Input options type for S3 list API.

ListAllOutput

Output type for S3 list API. Lists all bucket objects.

ListApi

ListApi: function

Type declaration

ListArgs

ListArgs: object

Type declaration

  • Optional filter?: object
  • Optional headers?: CustomHeaders
  • Optional selectionSet?: string[]

ListGeofenceOptions

ListGeofenceOptions: GeofenceOptions & object

ListGeofenceResults

ListGeofenceResults: object

Type declaration

  • entries: Geofence[]
  • nextToken: string | undefined

ListInputArgs

ListInputArgs: object

Type declaration

ListObjectsV2Input

ListObjectsV2Input: ListObjectsV2CommandInput

ListOutputItem

ListOutputItem: Omit<StorageItem, "metadata">

type for S3 list item.

ListPaginateInput

Input type for S3 list API. Lists bucket objects with pagination.

ListPaginateOptions

Input options type for S3 list API.

ListPaginateOutput

ListPaginateOutput: StorageListOutput<ListOutputItem> & object

Output type for S3 list API. Lists bucket objects with pagination.

ListPartsInput

ListPartsInput: Pick<ListPartsCommandInput, "Bucket" | "Key" | "UploadId">

LoadOrCreateMultipartUploadOptions

LoadOrCreateMultipartUploadOptions: object

Type declaration

  • Optional abortSignal?: AbortSignal
  • accessLevel: StorageAccessLevel
  • bucket: string
  • Optional contentDisposition?: string
  • Optional contentEncoding?: string
  • Optional contentType?: string
  • data: StorageUploadDataPayload
  • key: string
  • keyPrefix: string
  • Optional metadata?: Record<string, string>
  • s3Config: ResolvedS3Config
  • Optional size?: number

LoadOrCreateMultipartUploadResult

LoadOrCreateMultipartUploadResult: object

Type declaration

  • cachedParts: Part[]
  • uploadId: string

LocationServiceConfig

LocationServiceConfig: object

Type declaration

  • LocationService: object
    • Optional geofenceCollections?: object
      • default: string
      • items: string[]
    • Optional maps?: object
      • default: string
      • items: object
    • region: string
    • Optional searchIndices?: object
      • default: string
      • items: string[]

Longitude

Longitude: number

Lookup

Lookup: object

Type declaration

MFAPreference

MFAPreference: "ENABLED" | "DISABLED" | "PREFERRED" | "NOT_PREFERRED"

Cognito supported MFAPreference values that may be passed as part of the UpdateMFAPreferenceRequest.

ManagedIdentifier

ManagedIdentifier: IdentifierBrand<object, "ManagedIdentifier">

MapTypeToOperands

MapTypeToOperands: object

Type declaration

MatchableTypes

MatchableTypes: string | string[] | number | number[] | boolean | boolean[]

MediaAutoTrackConfig

MediaAutoTrackConfig: object

Type declaration

  • event: PersonalizeEvent
  • sessionId: string
  • trackingId: string
  • Optional userId?: string

MergeNoConflictKeys

MergeNoConflictKeys: Options extends [] ? OnlyOption : Options extends [] ? FirstOption & SecondOption : Options extends [] ? FirstOption & MergeNoConflictKeys<RestOptions> : never

Type to intersect multiple types if they have no conflict keys.

MetadataDirective

MetadataDirective: object[keyof typeof MetadataDirective]

MetadataOrDefault

MetadataOrDefault: T extends object ? T[typeof __modelMeta__] : DefaultPersistentModelMetaData

MetadataReadOnlyFields

MetadataReadOnlyFields: Extract<MetadataOrDefault<T, M>["readOnlyFields"] | M["readOnlyFields"], keyof T>

MetricsComparator

MetricsComparator: function

Type declaration

    • (metricsVal: number, eventVal: number): boolean
    • Parameters

      • metricsVal: number
      • eventVal: number

      Returns boolean

Middleware

Middleware: function

A slimmed down version of the AWS SDK v3 middleware, only handling tasks after Serde.

Type declaration

MiddlewareContext

MiddlewareContext: object

The context object to store states across the middleware chain.

Type declaration

  • Optional attemptsCount?: number

    The number of times the request has been attempted. This is set by retry middleware

MiddlewareHandler

MiddlewareHandler: function

A slimmed down version of the AWS SDK v3 middleware handler, only handling instantiated requests

Type declaration

    • (request: Input): Promise<Output>
    • Parameters

      • request: Input

      Returns Promise<Output>

Model

Model: ModelIntrospectionSchema["models"][string]

ModelAssociation

ModelAttribute

ModelAttribute: object

Type declaration

  • Optional properties?: Record<string, any>
  • type: string

ModelAttributeAuth

ModelAttributeAuth: object

Type declaration

ModelAttributeAuthProperty

ModelAttributeAuthProperty: object

Type declaration

ModelAttributeCompositeKey

ModelAttributeCompositeKey: object

Type declaration

  • properties: object
    • fields: []
    • name: string
  • type: "key"

ModelAttributeKey

ModelAttributeKey: object

Type declaration

  • properties: object
    • fields: string[]
    • Optional name?: string
  • type: "key"

ModelAttributePrimaryKey

ModelAttributePrimaryKey: object

Type declaration

  • properties: object
    • fields: string[]
    • name: never
  • type: "key"

ModelAttributes

ModelAttributes: ModelAttribute[]

ModelAuthModes

ModelAuthModes: Record<string, object>

ModelAuthRule

ModelAuthRule: object

Type declaration

  • allow: string
  • Optional groupClaim?: string
  • Optional groups?: string[]
  • Optional groupsField?: string
  • Optional identityClaim?: string
  • Optional operations?: string[]
  • Optional ownerField?: string
  • Optional provider?: string

ModelField

ModelField: object

Type declaration

ModelFieldType

ModelFieldType: object

Type declaration

ModelFields

ModelFields: Record<string, ModelField>

ModelInit

ModelInit: object & object

ModelInitBase

ModelInitBase: Omit<T, typeof __modelMeta__ | IdentifierFields<T, M> | MetadataReadOnlyFields<T, M>>

ModelInstanceCreator

ModelInstanceCreator: typeof modelInstanceCreator

Constructs a model and records it with its metadata in a weakset. Allows for the separate storage of core model fields and Amplify/DataStore metadata fields that the customer app does not want exposed.

param

The model constructor.

param

Init data that would normally be passed to the constructor.

returns

The initialized model.

ModelInstanceMetadata

ModelInstanceMetadata: object

Type declaration

  • _deleted: boolean
  • _lastChangedAt: number
  • _version: number

ModelInstanceMetadataWithId

ModelInstanceMetadataWithId: ModelInstanceMetadata & object

ModelIntrospectionSchema

ModelIntrospectionSchema: object

Type declaration

ModelKeys

ModelKeys: object

Type declaration

ModelMeta

ModelMeta: object

Type declaration

ModelPredicate

ModelPredicate: object & PredicateGroups<M>

ModelPredicateAggregateExtender

ModelPredicateAggregateExtender: function

Type declaration

ModelPredicateExtender

ModelPredicateExtender: function

A function that accepts a ModelPrecicate, which it must use to return a final condition.

This is used as predicates in DataStore.save(), DataStore.delete(), and DataStore sync expressions.

DataStore.save(record, model => model.field.eq('some value'))

Logical operators are supported. But, condtiions are related records are NOT supported. E.g.,

DataStore.delete(record, model => model.or(m => [
    m.field.eq('whatever'),
    m.field.eq('whatever else')
]))

Type declaration

ModelPredicateNegation

ModelPredicateNegation: function

Type declaration

ModelPredicateOperator

ModelPredicateOperator: function

Type declaration

MutableModel

MutableModel: DeepWritable<Omit<T, IdentifierFields<T, M> | MetadataReadOnlyFields<T, M>>> & Readonly<Pick<T, IdentifierFields<T, M> | MetadataReadOnlyFields<T, M>>>

MutationProcessorEvent

MutationProcessorEvent: object

Type declaration

NELatitude

NELatitude: Latitude

NELongitude

NELongitude: Longitude

NamespaceResolver

NamespaceResolver: function

Type declaration

NativeAction

NativeAction: object

Type declaration

  • Optional deeplink?: string
  • Optional url?: string

NativeMessage

NativeMessage: object | object & object

NativePermissionStatus

NetInfoModule

NetInfoModule: typeof NetInfo

NetworkStatus

NetworkStatus: object

Type declaration

  • online: boolean

NeverEmpty

NeverEmpty: object

Returns an updated response type to always return a value.

Type declaration

NonModelFieldType

NonModelFieldType: object

Type declaration

  • nonModel: string

NonModelTypeConstructor

NonModelTypeConstructor: object

Type declaration

NonNeverKeys

NonNeverKeys: object[keyof T]

NonNullableDeviceMetadata

NonNullableDeviceMetadata: DeviceMetadata & object

NotificationsConfig

NotifyMessageInteractionInput

NotifyMessageInteractionInput: object

Input type for NotifyMessageInteraction API.

Type declaration

NumberOperators

NumberOperators: ScalarNumberOperators<T> & object

OAuthConfig

OAuthConfig: object

Type declaration

  • domain: string
  • Optional providers?: Array<OAuthProvider | CustomProvider>
  • redirectSignIn: Array<string>
  • redirectSignOut: Array<string>
  • responseType: "code" | "token"
  • scopes: Array<OAuthScope>

OAuthProvider

OAuthProvider: "Google" | "Facebook" | "Amazon" | "Apple"

OAuthScope

OAuthScope: "email" | "openid" | "phone" | "email" | "profile" | "aws.cognito.signin.user.admin" | CustomScope

ObjectCannedACL

ObjectCannedACL: object[keyof typeof ObjectCannedACL]

ObjectLockLegalHoldStatus

ObjectLockLegalHoldStatus: object[keyof typeof ObjectLockLegalHoldStatus]

ObjectLockMode

ObjectLockMode: object[keyof typeof ObjectLockMode]

ObjectStorageClass

ObjectStorageClass: object[keyof typeof ObjectStorageClass]

ObserveQueryOptions

ObserveQueryOptions: Pick<ProducerPaginationInput<T>, "sort">

ObserverQuery

ObserverQuery: object

Type declaration

OmitOptionalFields

OmitOptionalFields: Omit<T, KeysOfSuperType<T, undefined> | OptionalRelativesOf<T>>

OmitOptionalRelatives

OmitOptionalRelatives: Omit<T, OptionalRelativesOf<T>>

OnCompleteInput

Input type for LexV2 onComplete API. Input type for LexV1 onComplete API.

OnMessageActionTakenInput

OnMessageActionTakenInput: OnMessageInteractionEventHandler

Input type for OnMessageActionTaken API.

OnMessageActionTakenOutput

OnMessageActionTakenOutput: EventListenerRemover

Output type for OnMessageActionTaken API.

OnMessageDismissedInput

OnMessageDismissedInput: OnMessageInteractionEventHandler

Input type for OnMessageDismissed API.

OnMessageDismissedOutput

OnMessageDismissedOutput: EventListenerRemover

Output type for OnMessageDismissed API.

OnMessageDisplayedInput

OnMessageDisplayedInput: OnMessageInteractionEventHandler

Input type for OnMessageDisplayed API.

OnMessageDisplayedOutput

OnMessageDisplayedOutput: EventListenerRemover

Output type for OnMessageDisplayed API.

OnMessageInteractionEventHandler

OnMessageInteractionEventHandler: function

Type declaration

    • (message: InAppMessage): void
    • Parameters

      • message: InAppMessage

      Returns void

OnMessageReceivedInput

OnMessageReceivedInput: OnMessageInteractionEventHandler

Input type for OnMessageReceived API.

OnMessageReceivedOutput

OnMessageReceivedOutput: EventListenerRemover

Output type for OnMessageReceived API.

OnNotificationOpened

OnNotificationOpened: function

OnNotificationOpenedInput

OnNotificationOpenedOutput

OnNotificationOpenedOutput: PushNotificationOnNotificationOpenedOutput

OnNotificationReceivedInBackground

OnNotificationReceivedInBackground: function

OnNotificationReceivedInBackgroundInput

OnNotificationReceivedInBackgroundInput: PushNotificationOnNotificationReceivedInBackgroundInput

OnNotificationReceivedInBackgroundOutput

OnNotificationReceivedInBackgroundOutput: PushNotificationOnNotificationReceivedInBackgroundOutput

OnNotificationReceivedInForeground

OnNotificationReceivedInForeground: function

OnNotificationReceivedInForegroundInput

OnNotificationReceivedInForegroundInput: PushNotificationOnNotificationReceivedInForegroundInput

OnNotificationReceivedInForegroundOutput

OnNotificationReceivedInForegroundOutput: PushNotificationOnNotificationReceivedInForegroundOutput

OnPushNotificationMessageHandler

OnPushNotificationMessageHandler: function

Type declaration

OnTokenReceived

OnTokenReceived: function

Type declaration

OnTokenReceivedHandler

OnTokenReceivedHandler: function

Type declaration

    • (token: string): void
    • Parameters

      • token: string

      Returns void

OnTokenReceivedInput

OnTokenReceivedOutput

OpenAuthSession

OpenAuthSession: function

Type declaration

OpenAuthSessionResult

OpenAuthSessionResult: object

Type declaration

OpenAuthSessionResultType

OpenAuthSessionResultType: "canceled" | "success" | "error"

Operation

Operation: object

Type representing an operation that can be canceled.

internal

Type declaration

  • cancel: function
      • (abortMessage?: string): void
      • Parameters

        • Optional abortMessage: string

        Returns void

  • response: Promise<Response>

OperationPrefix

OperationPrefix: object[ModelOperation]["operationPrefix"]

Option

Option: Option0 | Option1<T>

Option0

Option0: []

Option1

Option1: []

OptionToMiddleware

OptionToMiddleware: Options extends [] ? [] : Options extends [] ? [] : Options extends [] ? [] : never

Type to convert a middleware option type to a middleware type with the given option type.

OptionalRelativesOf

OptionalRelativesOf: KeysOfType<T, AsyncCollection<any>> | KeysOfSuperType<T, Promise<undefined>>

OptionalizeKey

OptionalizeKey: object & object

OptionallyManagedIdentifier

OptionallyManagedIdentifier: IdentifierBrand<object, "OptionallyManagedIdentifier">

PageViewTrackingOptions

PageViewTrackingOptions: object

Type declaration

  • Optional appType?: "multiPage" | "singlePage"
  • Optional attributes?: TrackerAttributes
  • Optional eventName?: string
  • Optional urlProvider?: function
      • (): string
      • Returns string

PagedList

PagedList: object

Describes a paged list result from AppSync, which can either live at the top query or property (e.g., related model) level.

Type declaration

  • __typename: TYPENAME
  • items: Array<T>
  • Optional nextToken?: string | null | undefined

PaginationInput

PaginationInput: object

Type declaration

  • Optional limit?: number
  • Optional page?: number
  • Optional sort?: SortPredicate<T>

ParameterizedStatement

ParameterizedStatement: []

ParsedMessagePayload

ParsedMessagePayload: object

Type declaration

  • payload: object
    • connectionTimeoutMs: number
    • Optional errors?: []
  • type: string

PartToUpload

PartToUpload: object

Type declaration

  • data: Blob | ArrayBuffer | string
  • partNumber: number
  • size: number

PatchInput

PatchOperation

PatchOperation: Operation<RestApiResponse>

PersistentModel

PersistentModel: Readonly<Record<string, any>>

PersistentModelConstructor

PersistentModelConstructor: object

Type declaration

PersistentModelMetaData

PersistentModelMetaData: object

Type declaration

  • Optional identifier?: Identifier<T>
  • Optional readOnlyFields?: string

PersonalizeBufferConfig

PersonalizeBufferConfig: EventBufferConfig & object

PersonalizeBufferEvent

PersonalizeBufferEvent: object

Type declaration

  • event: PersonalizeEvent
  • Optional sessionId?: string
  • timestamp: number
  • trackingId: string
  • Optional userId?: string

PersonalizeEvent

PersonalizeEvent: object

Type declaration

  • Optional eventId?: string
  • eventType: string
  • properties: Record<string, unknown>
  • Optional userId?: string

PersonalizeProviderConfig

PersonalizeProviderConfig: object

Type declaration

  • Personalize: object
    • Optional flushInterval?: number
    • Optional flushSize?: number
    • region: string
    • trackingId: string

PickOptionalFields

PickOptionalFields: Pick<T, KeysOfSuperType<T, undefined> | OptionalRelativesOf<T>>

PickOptionalRelatives

PickOptionalRelatives: Pick<T, OptionalRelativesOf<T>>

PinpointAnalyticsEvent

PinpointAnalyticsEvent: object

Type declaration

  • Optional attributes?: Record<string, string>
  • Optional metrics?: Record<string, number>
  • name: string

PinpointCommonParameters

PinpointCommonParameters: object

Type declaration

  • appId: string
  • category: SupportedCategory
  • Optional channelType?: SupportedChannelType
  • credentials: Required<AuthSession>["credentials"]
  • Optional identityId?: AuthSession["identityId"]
  • region: string
  • Optional userAgentValue?: string

PinpointEventBufferConfig

PinpointEventBufferConfig: EventBufferConfig & object

PinpointFlushEventsInput

PinpointFlushEventsInput: Partial<EventBufferConfig> & object

PinpointMessageEventSource

PinpointMessageEventSource: "_campaign" | "_journey"

PinpointProviderConfig

PinpointProviderConfig: object

Type declaration

PinpointRecordInput

PinpointRecordInput: Partial<EventBufferConfig> & PinpointCommonParameters & object

PinpointServiceOptions

PinpointServiceOptions: object

Type declaration

  • Optional address?: string
  • Optional optOut?: "ALL" | "NONE"
  • Optional userAttributes?: Record<string, string[]>

PinpointSession

PinpointSession: object

Type declaration

  • Optional Duration?: number
  • Id: string
  • StartTimestamp: string
  • Optional StopTimestamp?: string

PinpointUpdateEndpointInput

PinpointUpdateEndpointInput: PinpointCommonParameters & PinpointServiceOptions & object

PlaceGeometry

PlaceGeometry: object

Type declaration

PlatformDetectionEntry

PlatformDetectionEntry: object

Type declaration

  • detectionMethod: function
      • (): boolean
      • Returns boolean

  • platform: Framework

Polygon

Polygon: Array<Point> | Iterable<Point>

PolygonGeometry

PolygonGeometry: object

Type declaration

PostInput

PostOperation

PostOperation: Operation<RestApiResponse>

PredicateExpression

PredicateExpression: TypeName<FT> extends keyof MapTypeToOperands<FT> ? function : never

PredicateFieldType

PredicateFieldType: NonNullable<Scalar<T extends Promise<infer InnerPromiseType> ? InnerPromiseType : T extends AsyncCollection<infer InnerCollectionType> ? InnerCollectionType : T>>

PredicateGroups

PredicateGroups: object

Type declaration

PredicateObject

PredicateObject: object

Type declaration

  • field: keyof T
  • operand: any
  • operator: keyof AllOperators

PredicatesGroup

PredicatesGroup: object

Type declaration

PredictionsConfig

PredictionsConvertConfig

PredictionsConvertConfig: object

Type declaration

PredictionsIdentifyConfig

PredictionsIdentifyConfig: object

Type declaration

PredictionsInterpretConfig

PredictionsInterpretConfig: object

Type declaration

PredictionsProviderConfig

PredictionsProviderConfig: object

Type declaration

  • Optional defaults?: T
  • Optional proxy?: boolean
  • Optional region?: string

PrimaryKeyInfo

PrimaryKeyInfo: object

Type declaration

  • isCustomPrimaryKey: boolean
  • primaryKeyFieldName: string
  • sortKeyFieldNames: string[]

ProducerModelPredicate

ProducerModelPredicate: function

Type declaration

ProducerPaginationInput

ProducerPaginationInput: object

Type declaration

ProducerSortPredicate

ProducerSortPredicate: function

Type declaration

PropertyNameWithStringValue

PropertyNameWithStringValue: string

PropertyNameWithSubsequentDeserializer

PropertyNameWithSubsequentDeserializer: []

PubSubContent

PubSubContent: Record<string, unknown>

PubSubContentObserver

PubSubContentObserver: Observer<PubSubContent>

PublishInput

PublishInput: object

Type declaration

PushNotificationConfig

PushNotificationConfig: PinpointProviderConfig

PushNotificationEvent

PushNotificationEvent: "backgroundMessageReceived" | "foregroundMessageReceived" | "launchNotificationOpened" | "notificationOpened" | "tokenReceived"

PushNotificationGetBadgeCountOutput

PushNotificationGetBadgeCountOutput: number | null

PushNotificationGetLaunchNotificationOutput

PushNotificationGetLaunchNotificationOutput: PushNotificationMessage | null

PushNotificationGetPermissionStatusOutput

PushNotificationGetPermissionStatusOutput: PushNotificationPermissionStatus

PushNotificationIdentifyUserInput

PushNotificationIdentifyUserInput: object

Type declaration

  • Optional options?: ServiceOptions

    Options to be passed to the API.

  • userId: string

    A User ID associated to the current device.

  • userProfile: UserProfile

    Additional information about the user and their device.

PushNotificationModule

PushNotificationModule: typeof __type

PushNotificationOnNotificationOpenedInput

PushNotificationOnNotificationOpenedInput: OnPushNotificationMessageHandler

PushNotificationOnNotificationOpenedOutput

PushNotificationOnNotificationOpenedOutput: EventListenerRemover

PushNotificationOnNotificationReceivedInBackgroundInput

PushNotificationOnNotificationReceivedInBackgroundInput: OnPushNotificationMessageHandler

PushNotificationOnNotificationReceivedInBackgroundOutput

PushNotificationOnNotificationReceivedInBackgroundOutput: EventListenerRemover

PushNotificationOnNotificationReceivedInForegroundInput

PushNotificationOnNotificationReceivedInForegroundInput: OnPushNotificationMessageHandler

PushNotificationOnNotificationReceivedInForegroundOutput

PushNotificationOnNotificationReceivedInForegroundOutput: EventListenerRemover

PushNotificationOnTokenReceivedInput

PushNotificationOnTokenReceivedInput: OnTokenReceivedHandler

PushNotificationOnTokenReceivedOutput

PushNotificationOnTokenReceivedOutput: EventListenerRemover

PushNotificationPermissionStatus

PushNotificationPermissionStatus: "denied" | "granted" | "shouldRequest" | "shouldExplainThenRequest"

PushNotificationProviderConfig

PushNotificationProviderConfig: object

Type declaration

PushNotificationRequestPermissionsInput

PushNotificationRequestPermissionsInput: PushNotificationPermissions

PushNotificationRequestPermissionsOutput

PushNotificationRequestPermissionsOutput: boolean

PushNotificationServiceOptions

PushNotificationServiceOptions: Record<string, unknown>

Base type for service options.

PushNotificationSetBadgeCountInput

PushNotificationSetBadgeCountInput: number

PutInput

PutObjectCommandInputType

PutObjectCommandInputType: Omit<PutObjectRequest, "Body"> & object

PutObjectInput

PutObjectInput: Pick<PutObjectCommandInput, "Bucket" | "Key" | "Body" | "ACL" | "CacheControl" | "ContentDisposition" | "ContentEncoding" | "ContentType" | "ContentMD5" | "Expires" | "Metadata" | "Tagging">

PutOperation

PutOperation: Operation<RestApiResponse>

QueryArgs

QueryArgs: Record<string, unknown>

RESTProviderConfig

RESTProviderConfig: object

Type declaration

ReadOptions

ReadOptions: object | object

RecordInput

RecordInput: PersonalizeEvent

Input type for Pinpoint record API.

RecursiveModelPredicate

RecursiveModelPredicate: object & object & PredicateInternalsKey

RecursiveModelPredicateAggregateExtender

RecursiveModelPredicateAggregateExtender: function

Type declaration

RecursiveModelPredicateExtender

RecursiveModelPredicateExtender: function

A function that accepts a RecursiveModelPrecicate, which it must use to return a final condition.

This is used in DataStore.query(), DataStore.observe(), and DataStore.observeQuery() as the second argument. E.g.,

DataStore.query(MyModel, model => model.field.eq('some value'))

More complex queries should also be supported. E.g.,

DataStore.query(MyModel, model => model.and(m => [
  m.relatedEntity.or(relative => [
    relative.relativeField.eq('whatever'),
    relative.relativeField.eq('whatever else')
  ]),
  m.myModelField.ne('something')
]))

Type declaration

RecursiveModelPredicateNegation

RecursiveModelPredicateNegation: function

Type declaration

RecursiveModelPredicateOperator

RecursiveModelPredicateOperator: function

Reducer

Reducer: function

Type declaration

    • (state: State, action: Action): State
    • Parameters

      • state: State
      • action: Action

      Returns State

RelationType

RelationType: object

Type declaration

  • Optional associatedWith?: string | string[]
  • fieldName: string
  • modelName: string
  • relationType: "HAS_ONE" | "HAS_MANY" | "BELONGS_TO"
  • Optional targetName?: string
  • Optional targetNames?: string[]

RelationshipType

RelationshipType: object

Type declaration

RemoveInput

Input type for S3 remove API.

RemoveOptions

RemoveOptions: WriteOptions & CommonOptions

Input options type for S3 getProperties API.

RemoveOutput

RemoveOutput: Pick<Item, "key">

Output type for S3 remove API.

ReplicationStatus

ReplicationStatus: object[keyof typeof ReplicationStatus]

ReqClientParams

ReqClientParams: object

Type declaration

  • Optional authMode?: GraphQLAuthMode
  • Optional authToken?: string
  • config: CreateServerRunnerInput["config"]

RequestCharged

RequestCharged: object[keyof typeof RequestCharged]

RequestPayer

RequestPayer: object[keyof typeof RequestPayer]

RequestPermissions

RequestPermissions: function

Type declaration

RequestPermissionsInput

RequestPermissionsOutput

ResendSignUpCodeInput

Input type for Cognito resendSignUpCode API.

ResendSignUpCodeOptions

ResendSignUpCodeOptions: AuthServiceOptions & object

Options specific to Cognito Resend Sign Up code.

ResendSignUpCodeOutput

Output type for Cognito resendSignUpCode API.

ResetPasswordInput

Input type for Cognito resetPassword API.

ResetPasswordOptions

ResetPasswordOptions: AuthServiceOptions & object

Options specific to Cognito Reset Password.

ResetPasswordOutput

Output type for Cognito resetPassword API.

ResetPasswordStep

ResetPasswordStep: object

Type declaration

  • signInStep: "RESET_PASSWORD"

    Auth step requires user to change their password.

    Try calling resetPassword.

ResolvePrefixOptions

ResolvePrefixOptions: object

Type declaration

ResolvedS3Config

ResolvedS3Config: object

Internal only type for S3 API handlers' config parameter.

internal

Type declaration

  • credentials: AWSCredentials
  • Optional customEndpoint?: string
  • Optional forcePathStyle?: boolean
  • region: string
  • Optional useAccelerateEndpoint?: boolean

ResolvedS3ConfigAndInput

ResolvedS3ConfigAndInput: object

Type declaration

  • bucket: string
  • Optional isObjectLockEnabled?: boolean
  • keyPrefix: string
  • s3Config: ResolvedS3Config

ResourcesConfig

ResourcesConfig: object

Type declaration

ResponseBodyMixin

ResponseBodyMixin: Pick<Body, "blob" | "json" | "text">

Reduce the API surface of Fetch API's Body mixin to only the methods we need. In React Native, body.arrayBuffer() is not supported. body.formData() is not supported for now.

ResponsePayload

ResponsePayload: object

Type declaration

RestApiOptionsBase

RestApiOptionsBase: object
internal

Type declaration

  • Optional body?: DocumentType | FormData
  • Optional headers?: Headers
  • Optional queryParams?: Record<string, string>
  • Optional withCredentials?: boolean

    Option controls whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. It has no effect on same-origin requests. If set to true, the request will include credentials such as cookies, authorization headers, TLS client certificates, and so on. Moreover the response cookies will also be set. If set to false, the cross-site request will not include credentials, and the response cookies from a different domain will be ignored.

    default

    false

    see

    https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials

RevokeTokenInput

RevokeTokenInput: object

Type declaration

  • ClientId: string
  • Token: string

RevokeTokenOutput

RevokeTokenOutput: object

Type declaration

S3ApiOptions

S3ApiOptions: object

Type declaration

  • Optional accessLevel?: StorageAccessLevel
  • Optional targetIdentityId?: string
  • Optional useAccelerateEndpoint?: boolean

S3Bucket

S3Bucket: string

S3EndpointResolverOptions

S3EndpointResolverOptions: EndpointResolverOptions & object

Options for endpoint resolver.

internal

S3GetObjectPresignedUrlConfig

S3GetObjectPresignedUrlConfig: Omit<UserAgentOptions & PresignUrlOptions & S3EndpointResolverOptions, "signingService" | "signingRegion"> & object

S3ObjectName

S3ObjectName: string

S3ObjectVersion

S3ObjectVersion: string

S3ProviderConfig

S3ProviderConfig: object

Type declaration

  • S3: object
    • Optional bucket?: string
    • Optional dangerouslyConnectToHttpEndpointForTesting?: string

      Internal-only configuration for testing purpose. You should not use this.

      internal
    • Optional region?: string

SWLatitude

SWLatitude: Latitude

SWLongitude

SWLongitude: Longitude

SameSite

SameSite: "strict" | "lax" | "none"

SaveGeofencesResults

SaveGeofencesResults: object

Type declaration

Scalar

Scalar: T extends Array<infer InnerType> ? InnerType : T

ScalarNumberOperators

ScalarNumberOperators: EqualityOperators<T> & object

Schema

Schema: UserSchema & object

SchemaEnum

SchemaEnum: object

Type declaration

  • name: string
  • values: string[]

SchemaEnums

SchemaEnums: Record<string, SchemaEnum>

SchemaModel

SchemaModel: object

Type declaration

  • Optional allFields?: ModelFields

    Explicitly defined fields plus implied fields. (E.g., foreign keys.)

  • Optional attributes?: ModelAttributes
  • fields: ModelFields

    Explicitly defined fields.

  • name: string
  • pluralName: string
  • Optional syncable?: boolean

SchemaModels

SchemaModels: Record<string, SchemaModel>

Top-level Entities on a Schema

SchemaNamespace

SchemaNamespace: UserSchema & object

SchemaNamespaces

SchemaNamespaces: Record<string, SchemaNamespace>

SchemaNonModel

SchemaNonModel: object

Type declaration

SchemaNonModels

SchemaNonModels: Record<string, SchemaNonModel>

SearchByCoordinatesOptions

SearchByCoordinatesOptions: object

Type declaration

  • Optional maxResults?: number
  • Optional providerName?: string
  • Optional searchIndexName?: string

SearchByTextOptions

SearchForSuggestionsResult

SearchForSuggestionsResult: object

Type declaration

  • Optional placeId?: string
  • text: string

SearchForSuggestionsResults

SearchForSuggestionsResults: SearchForSuggestionsResult[]

SendInput

Input type for LexV2 send API. Input type for LexV1 send API.

SendOutput

Output type for LexV2 send API. Output type for LexV1 send API.

SendUserAttributeVerificationCodeInput

Input type for Cognito sendUserAttributeVerificationCode API.

SendUserAttributeVerificationCodeOptions

SendUserAttributeVerificationCodeOptions: AuthServiceOptions & object

Options specific to a Cognito Update User Attributes request.

SendUserAttributeVerificationCodeOutput

SendUserAttributeVerificationCodeOutput: AuthCodeDeliveryDetails<AuthVerifiableAttributeKey>

Output type for Cognito sendUserAttributeVerificationCode API.

ServerSideEncryption

ServerSideEncryption: object[keyof typeof ServerSideEncryption]

ServiceError

ServiceError: object

Type declaration

  • message: string
  • name: string

SessionState

SessionState: "started" | "ended"

SessionStateChangeListener

SessionStateChangeListener: function

Type declaration

SessionTrackingOptions

SessionTrackingOptions: object

Type declaration

SetBadgeCount

SetBadgeCount: function

Type declaration

SetBadgeCountInput

SetConflictHandlerInput

SetConflictHandlerInput: InAppMessageConflictHandler

Input type for Pinpoint SetConflictHandler API.

SetCustomUserAgentInput

SetUpTOTPOutput

SetUpTOTPOutput: AuthTOTPSetupDetails

Output type for Cognito setUpTOTP API.

SettableFieldType

SettableFieldType: T extends Promise<infer InnerPromiseType> ? undefined extends InnerPromiseType ? InnerPromiseType | null : InnerPromiseType : T extends AsyncCollection<infer InnerCollectionType> ? InnerCollectionType[] | undefined : undefined extends T ? T | null : T

SettingMetaData

SettingMetaData: object

Type declaration

SignInAction

SignInAction: object | object | object | object | object

SignInInput

Input type for Cognito signIn API.

SignInOptions

SignInOptions: AuthServiceOptions & object

Options specific to Cognito Sign In.

SignInOutput

SignInOutput: AuthSignInOutput

Output type for Cognito signIn API.

SignInState

SignInState: object

Type declaration

SignInWithCustomAuthInput

SignInWithCustomAuthInput: AuthSignInInput<SignInOptions>

Input type for Cognito signInWithCustomAuth API.

SignInWithCustomAuthOutput

SignInWithCustomAuthOutput: AuthSignInOutput

Output type for Cognito signInWithCustomAuth API.

SignInWithCustomSRPAuthInput

SignInWithCustomSRPAuthInput: AuthSignInInput<SignInOptions>

Input type for Cognito signInWithCustomSRPAuth API.

SignInWithCustomSRPAuthOutput

SignInWithCustomSRPAuthOutput: AuthSignInOutput

Output type for Cognito signInWithCustomSRPAuth API.

SignInWithRedirectInput

SignInWithRedirectInput: AuthSignInWithRedirectInput

Input type for Cognito signInWithRedirect API.

SignInWithSRPInput

SignInWithSRPInput: AuthSignInInput<SignInOptions>

Input type for Cognito signInWithSRP API.

SignInWithSRPOutput

SignInWithSRPOutput: AuthSignInOutput

Output type for Cognito signInWithSRP API.

SignInWithUserPasswordInput

SignInWithUserPasswordInput: AuthSignInInput<SignInOptions>

Input type for Cognito signInWithUserPasswordInput API.

SignInWithUserPasswordOutput

SignInWithUserPasswordOutput: AuthSignInOutput

Output type for Cognito signInWithUserPassword API.

SignInWithWebUIOptions

SignInWithWebUIOptions: ServiceOptions

SignOutInput

SignOutInput: AuthSignOutInput

Input type for Cognito signOut API.

SignUpInput

Input type for Cognito signUp API.

SignUpOptions

SignUpOptions: AuthSignUpOptions<UserAttributeKey> & object

Options specific to Cognito Sign Up.

SignUpOutput

Output type for Cognito signUp API.

SigningServiceInfo

SigningServiceInfo: object

Type declaration

  • Optional region?: string
  • Optional service?: string

SortPredicate

SortPredicate: object

Type declaration

SortPredicateExpression

SortPredicateExpression: TypeName<FT> extends keyof MapTypeToOperands<FT> ? function : never

SortPredicateObject

SortPredicateObject: object

Type declaration

  • field: keyof T
  • sortDirection: keyof typeof SortDirection

SortPredicatesGroup

SortPredicatesGroup: SortPredicateObject<T>[]

SourceData

SourceData: string | ArrayBuffer | ArrayBufferView

SpeechGeneratorDefaults

SpeechGeneratorDefaults: object

Type declaration

  • Optional voiceId?: string

StartParams

StartParams: object

Type declaration

  • fullSyncInterval: number

StopListenerCallback

StopListenerCallback: function

Type declaration

    • (): void
    • Returns void

Storage

Storage: InstanceType<typeof StorageClass>

StorageAccessLevel

StorageAccessLevel: "guest" | "protected" | "private"

StorageConfig

StorageCopyInput

StorageCopyInput: object

Type declaration

  • destination: DestinationOptions
  • source: SourceOptions

StorageDownloadDataInput

StorageDownloadDataInput: StorageOperationInput<Options>

StorageDownloadDataOutput

StorageDownloadDataOutput: T & object

StorageFacade

StorageFacade: Omit<Adapter, "setUp">

StorageGetPropertiesInput

StorageGetPropertiesInput: StorageOperationInput<Options>

StorageGetUrlInput

StorageGetUrlInput: StorageOperationInput<Options>

StorageGetUrlOutput

StorageGetUrlOutput: object

Type declaration

  • expiresAt: Date

    expiresAt is date in which generated URL expires.

  • url: __type

    presigned URL of the given object.

StorageItem

StorageItem: object

Type declaration

  • Optional eTag?: string

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.

  • key: string

    Key of the object

  • Optional lastModified?: Date

    Creation date of the object.

  • Optional metadata?: Record<string, string>

    The user-defined metadata for the object uploaded to S3.

    see

    https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html#UserMetadata

  • Optional size?: number

    Size of the body in bytes.

StorageListAllOptions

StorageListAllOptions: StorageOptions & object

StorageListInput

StorageListInput: object

Type declaration

  • Optional options?: Options
  • Optional prefix?: string

StorageListOutput

StorageListOutput: object

Type declaration

  • items: Item[]

StorageListPaginateOptions

StorageListPaginateOptions: StorageOptions & object

StorageOperationInput

StorageOperationInput: object

Type declaration

  • key: string
  • Optional options?: Options

StorageOptions

StorageOptions: object

Type declaration

StoragePrefixResolver

StoragePrefixResolver: function

Type declaration

StorageRemoveInput

StorageRemoveInput: object

Type declaration

  • key: string
  • Optional options?: Options

StorageRemoveOptions

StorageRemoveOptions: StorageOptions

StorageSubscriptionMessage

StorageSubscriptionMessage: InternalSubscriptionMessage<T> & object

StorageUploadDataInput

StorageUploadDataInput: StorageOperationInput<Options> & object

StorageUploadDataPayload

StorageUploadDataPayload: Blob | ArrayBufferView | ArrayBuffer | string

The data payload type for upload operation.

StorageUploadOutput

StorageUploadOutput: Item

StorageUserAgentInput

StorageUserAgentInput: object

Type declaration

Store

Store: function

Type declaration

StrictUnion

StrictUnion: StrictUnionHelper<T, T>

StrictUnionHelper

StrictUnionHelper: T extends any ? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, never>> : never

StringOperators

StringOperators: ScalarNumberOperators<T> & object

SubscribeInput

SubscribeInput: object

Type declaration

SubscriptionMessage

SubscriptionMessage: Pick<InternalSubscriptionMessage<T>, "opType" | "element" | "model" | "condition">

SupportedCategory

SupportedCategory: "Analytics" | "Core" | "InAppMessaging" | "PushNotification"

SupportedChannelType

SupportedChannelType: "APNS" | "APNS_SANDBOX" | "GCM" | "IN_APP"

SyncConflict

SyncConflict: object

Type declaration

SyncError

SyncError: object

Type declaration

  • Optional cause?: Error
  • Optional errorInfo?: string
  • errorType: ErrorType
  • localModel: T
  • message: string
  • Optional model?: string
  • operation: string
  • process: ProcessName
  • Optional recoverySuggestion?: string
  • remoteModel: T

SyncExpression

SyncExpression: Promise<object>

SyncModelPage

SyncModelPage: object

Type declaration

SystemComponent

SystemComponent: object

Type declaration

TaggingDirective

TaggingDirective: object[keyof typeof TaggingDirective]

TargetNameAssociation

TargetNameAssociation: object

Type declaration

  • connectionType: "BELONGS_TO"
  • Optional targetName?: string
  • Optional targetNames?: string[]

TextDetectionList

TextDetectionList: TextDetection[]

TimeOutOutput

TimeOutOutput: ReturnType<typeof setTimeout>

TokenPayload

TokenPayload: object

Type declaration

  • token: string

TokenProvider

TokenProvider: object

Type declaration

  • getTokens: function

TokenRefresher

TokenRefresher: function

Type declaration

    • Parameters

      • __namedParameters: object
        • authConfig: object & object | object & object | object & object | object & object | object & object | object & object | object & object | object & object | object & object
        • tokens: object & object
        • username: string

      Returns Promise<CognitoAuthTokens>

TrackerAttributes

TrackerAttributes: Record<string, string>

TrackerEventRecorder

TrackerEventRecorder: function

Type declaration

TrackerType

TrackerType: "event" | "pageView" | "session"

TranscribeData

TranscribeData: object

Type declaration

  • connection: WebSocket
  • languageCode: string
  • raw: ConvertBytes

TranscriptionDefaults

TranscriptionDefaults: object

Type declaration

  • Optional language?: string

TransferOptions

TransferOptions: object

Transfer-related options type for S3 downloadData, uploadData APIs.

Type declaration

TransferProgressEvent

TransferProgressEvent: object

Type declaration

  • Optional totalBytes?: number
  • transferredBytes: number

TransferTask

TransferTask: object

Type declaration

  • cancel: function

    Cancel an ongoing transfer(upload/download) task. This will reject the result promise with an AbortError by default. You can use isCancelError to check if the error is caused by cancellation.

    param

    Optional error message to overwrite the default canceled message thrown when the task is canceled. If provided, the result promise will be rejected with a CanceledError with supplied error message instead.

      • (message?: string): void
      • Parameters

        • Optional message: string

        Returns void

  • pause: function

    Pause an ongoing transfer(upload/download) task. This method does not support the following scenarios:

    • Downloading data or file from given key.
      • (): void
      • Returns void

  • result: Promise<Result>

    Promise that resolves when the transfer task is completed. The promise will be rejected if the task is canceled.

  • resume: function

    Resume a paused transfer(upload/download) task. This method does not support the following scenarios:

    • Downloading data or file from given key.
      • (): void
      • Returns void

  • Readonly state: TransferTaskState

    Current state of the transfer task.

TransferTaskState

TransferTaskState: "IN_PROGRESS" | "PAUSED" | "CANCELED" | "SUCCESS" | "ERROR"

TranslateTextDefaults

TranslateTextDefaults: object

Type declaration

  • Optional sourceLanguage?: string
  • Optional targetLanguage?: string

TypeConstructorMap

TypeConstructorMap: Record<string, PersistentModelConstructor<any> | NonModelTypeConstructor<unknown>>

TypeName

TypeName: T extends string ? "string" : T extends number ? "number" : T extends boolean ? "boolean" : T extends string[] ? "string[]" : T extends number[] ? "number[]" : T extends boolean[] ? "boolean[]" : never

UnionKeys

UnionKeys: T extends T ? keyof T : never

UnknownGraphQLResponse

UnknownGraphQLResponse: Promise<GraphQLResult<any>> | GraphqlSubscriptionResult<any>

Result type for graphql() operations that don't include any specific type information. The result could be either a Promise or Subscription.

Invoking code should either cast the result or use ? and ! operators to navigate the result objects.

UntypedCondition

UntypedCondition: object

Type declaration

UpdateMFAPreferenceInput

UpdateMFAPreferenceInput: object

Input type for Cognito updateMFAPreference API.

Type declaration

UpdatePasswordInput

UpdatePasswordInput: AuthUpdatePasswordInput

Input type for Cognito updatePassword API.

UpdateUserAttributeInput

Input type for Cognito updateUserAttribute API.

UpdateUserAttributeOptions

UpdateUserAttributeOptions: AuthServiceOptions & object

Options specific to Cognito Update User Attribute.

UpdateUserAttributeOutput

Output type for Cognito updateUserAttribute API.

UpdateUserAttributesInput

Input type for Cognito updateUserAttributes API.

UpdateUserAttributesOptions

UpdateUserAttributesOptions: AuthServiceOptions & object

Options specific to Cognito Update User Attributes.

UpdateUserAttributesOutput

Output type for Cognito updateUserAttributes API.

UploadDataInput

Input type for S3 uploadData API.

UploadDataOptions

UploadDataOptions: WriteOptions & CommonOptions & TransferOptions & object

UploadDataOutput

UploadDataOutput: UploadTask<Item>

Output type for S3 uploadData API.

UploadPartCommandInputType

UploadPartCommandInputType: Omit<UploadPartRequest, "Body"> & object

UploadPartExecutorOptions

UploadPartExecutorOptions: object

Type declaration

  • abortSignal: AbortSignal
  • bucket: string
  • completedPartNumberSet: Set<number>
  • dataChunkerGenerator: Generator<PartToUpload, void, undefined>
  • finalKey: string
  • Optional isObjectLockEnabled?: boolean
  • onPartUploadCompletion: function
      • (partNumber: number, eTag: string): void
      • Parameters

        • partNumber: number
        • eTag: string

        Returns void

  • Optional onProgress?: function
  • s3Config: ResolvedS3Config
  • uploadId: string

UploadPartInput

UploadPartInput: Pick<UploadPartCommandInput, "PartNumber" | "Body" | "UploadId" | "Bucket" | "Key" | "ContentMD5">

UploadTask

UploadTask: TransferTask<Result>

UploadsCacheKeyOptions

UploadsCacheKeyOptions: object

Type declaration

  • accessLevel: StorageAccessLevel
  • bucket: string
  • Optional contentType?: string
  • Optional file?: File
  • key: string
  • size: number

UserAgentDetailsWithCategory

UserAgentDetailsWithCategory: CustomUserAgentDetailsBase & object

UserAttributeKey

The user attribute types available for Cognito.

UserProfile

UserProfile: object

Type declaration

  • Optional customProperties?: Record<string, string[]>
  • Optional demographic?: object
    • Optional appVersion?: string
    • Optional locale?: string
    • Optional make?: string
    • Optional model?: string
    • Optional modelVersion?: string
    • Optional platform?: string
    • Optional platformVersion?: string
    • Optional timezone?: string
  • Optional email?: string
  • Optional location?: object
    • Optional city?: string
    • Optional country?: string
    • Optional latitude?: number
    • Optional longitude?: number
    • Optional postalCode?: string
    • Optional region?: string
  • Optional metrics?: Record<string, number>
  • Optional name?: string
  • Optional plan?: string

UserSchema

UserSchema: object

Type declaration

V5ModelPredicate

V5ModelPredicate: WithoutNevers<object> & object & PredicateInternalsKey

V6Client

V6Client: ExcludeNeverFields<object>

V6ClientSSRCookies

V6ClientSSRCookies: ExcludeNeverFields<object>

V6ClientSSRRequest

V6ClientSSRRequest: ExcludeNeverFields<object>

ValidationData

ValidationData: object

One or more name-value pairs containing the validation data in the request to register a user.

Type declaration

  • [key: string]: string

ValuePredicate

ValuePredicate: object

Type declaration

VerifiableUserAttributeKey

VerifiableUserAttributeKey: AuthVerifiableAttributeKey

Verifiable user attribute types available for Cognito.

VerifyTOTPSetupInput

Input type for Cognito verifyTOTPSetup API.

VerifyTOTPSetupOptions

VerifyTOTPSetupOptions: AuthServiceOptions & object

Options specific to Cognito Verify TOTP Setup.

WebBrowserModule

WebBrowserModule: typeof __type

WithListsFixed

WithListsFixed: T extends PagedList<infer IT, infer NAME> ? PagedList<Exclude<IT, null | undefined>, NAME> : T extends object ? object : T

Recursively looks through a result type and removes nulls and and undefined from PagedList types.

Although a graphql response might contain empty values in an array, this will only be the case when we also have errors, which will then be thrown.

WithoutNevers

WithoutNevers: Pick<T, NonNeverKeys<T>>

WriteOptions

WriteOptions: object

Type declaration

lexV2BaseReqParams

lexV2BaseReqParams: object

Type declaration

  • botAliasId: string
  • botId: string
  • localeId: string
  • sessionId: string

searchByPlaceIdOptions

searchByPlaceIdOptions: object

Type declaration

  • Optional searchIndexName?: string

Variables

Const ABORT_ERROR_CODE

ABORT_ERROR_CODE: "ERR_ABORTED" = "ERR_ABORTED"

Const ABORT_ERROR_MESSAGE

ABORT_ERROR_MESSAGE: "Request aborted" = "Request aborted"

Const ACCEPTED_CODES

ACCEPTED_CODES: number[] = [202]

Const ALGORITHM_QUERY_PARAM

ALGORITHM_QUERY_PARAM: "X-Amz-Algorithm" = "X-Amz-Algorithm"

Const AMPLIFY_SYMBOL

AMPLIFY_SYMBOL: Symbol = (typeof Symbol !== 'undefined'? Symbol('amplify_default'): '@@amplify_default') as Symbol

Const AMZ_DATE_HEADER

AMZ_DATE_HEADER: string = AMZ_DATE_QUERY_PARAM.toLowerCase()

Const AMZ_DATE_QUERY_PARAM

AMZ_DATE_QUERY_PARAM: "X-Amz-Date" = "X-Amz-Date"

Const ANDROID_CAMPAIGN_ACTIVITY_ID_KEY

ANDROID_CAMPAIGN_ACTIVITY_ID_KEY: "pinpoint.campaign.campaign_activity_id" = "pinpoint.campaign.campaign_activity_id"

Const ANDROID_CAMPAIGN_ID_KEY

ANDROID_CAMPAIGN_ID_KEY: "pinpoint.campaign.campaign_id" = "pinpoint.campaign.campaign_id"

Const ANDROID_CAMPAIGN_TREATMENT_ID_KEY

ANDROID_CAMPAIGN_TREATMENT_ID_KEY: "pinpoint.campaign.treatment_id" = "pinpoint.campaign.treatment_id"

Const APIG_HOSTNAME_PATTERN

APIG_HOSTNAME_PATTERN: RegExp = /^.+\.([a-z0-9-]+)\.([a-z0-9-]+)\.amazonaws\.com/

Const AUTH_HEADER

AUTH_HEADER: "authorization" = "authorization"

Const AUTO_SIGN_IN_EXCEPTION

AUTO_SIGN_IN_EXCEPTION: "AutoSignInException" = "AutoSignInException"

Const AWS_CLOUDWATCH_CATEGORY

AWS_CLOUDWATCH_CATEGORY: "Logging" = "Logging"

Const AWS_ENDPOINT_REGEX

AWS_ENDPOINT_REGEX: RegExp = /([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(.cn)?$/

Const Alignment

Alignment: object

Type declaration

  • Readonly CENTER: "CENTER"
  • Readonly LEFT: "LEFT"
  • Readonly RIGHT: "RIGHT"

Const Amplify

Amplify: AmplifyClass = new AmplifyClass()

The Amplify utility is used to configure the library.

remarks

Amplify is responsible for orchestrating cross-category communication within the library.

Const AmplifyUrl

AmplifyUrl: object = URL

Type declaration

  • constructor: function
    • Parameters

      Returns __type

  • prototype: __type
  • createObjectURL: function
    • createObjectURL(obj: Blob | MediaSource): string
    • Parameters

      • obj: Blob | MediaSource

      Returns string

  • revokeObjectURL: function
    • revokeObjectURL(url: string): void
    • Parameters

      • url: string

      Returns void

Const AmplifyUrlSearchParams

AmplifyUrlSearchParams: object = URLSearchParams

Type declaration

  • constructor: function
    • Parameters

      • Optional init: string[][] | Record<string, string> | string | __type

      Returns __type

  • prototype: __type
  • toString: function
    • toString(): string
    • Returns string

Const ArchiveStatus

ArchiveStatus: object

Type declaration

  • Readonly ARCHIVE_ACCESS: "ARCHIVE_ACCESS"
  • Readonly DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS"

Const AsyncStorage

AsyncStorage: object = loadAsyncStorage()

Type declaration

Const BACKGROUND_TASK_TIMEOUT

BACKGROUND_TASK_TIMEOUT: 25 = 25

Const BASE_USER_AGENT

BASE_USER_AGENT: "aws-amplify" = `aws-amplify`

Const BI_FP

BI_FP: 52 = 52

Const BI_RC

BI_RC: any[] = new Array()

Const BI_RM

BI_RM: "0123456789abcdefghijklmnopqrstuvwxyz" = "0123456789abcdefghijklmnopqrstuvwxyz"

Const BUFFER_SIZE

BUFFER_SIZE: 1000 = 1000

Const ButtonAction

ButtonAction: object

Type declaration

  • Readonly CLOSE: "CLOSE"
  • Readonly DEEP_LINK: "DEEP_LINK"
  • Readonly LINK: "LINK"

Const CACHE_EXPIRY_IN_DAYS

CACHE_EXPIRY_IN_DAYS: 7 = 7

Const CANCELED_ERROR_CODE

CANCELED_ERROR_CODE: "ERR_CANCELED" = "ERR_CANCELED"

Const CANCELED_ERROR_MESSAGE

CANCELED_ERROR_MESSAGE: "canceled" = "canceled"

Const CATEGORY

CATEGORY: "InAppMessaging" = "InAppMessaging"

Const CHANNEL_TYPE

CHANNEL_TYPE: "IN_APP" = "IN_APP"

Const CLOCK_SKEW_ERROR_CODES

CLOCK_SKEW_ERROR_CODES: string[] = ['AuthFailure','InvalidSignatureException','RequestExpired','RequestInTheFuture','RequestTimeTooSkewed','SignatureDoesNotMatch','BadRequestException', // API Gateway]

Const CODE_VERIFIER_CHARSET

CODE_VERIFIER_CHARSET: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"

Const COLLECTION

COLLECTION: "Collection" = "Collection"

Const CONNECTION_INIT_TIMEOUT

CONNECTION_INIT_TIMEOUT: 15000 = 15000

Time in milleseconds to wait for GQL_CONNECTION_INIT message Time in milleseconds to wait for GQL_CONNECTION_INIT message

Const CONNECTION_STATE_CHANGE

CONNECTION_STATE_CHANGE: "ConnectionStateChange" = "ConnectionStateChange"

Const CONTENT_SHA256_HEADER

CONTENT_SHA256_HEADER: "x-amz-content-sha256" = "x-amz-content-sha256"

Const CREDENTIALS_TTL

CREDENTIALS_TTL: number = 50 * 60 * 1000

Const CREDENTIAL_QUERY_PARAM

CREDENTIAL_QUERY_PARAM: "X-Amz-Credential" = "X-Amz-Credential"

Const Cache

Cache: StorageCache = new StorageCache()

Const ChannelType

ChannelType: object

Type declaration

  • Readonly ADM: "ADM"
  • Readonly APNS: "APNS"
  • Readonly APNS_SANDBOX: "APNS_SANDBOX"
  • Readonly APNS_VOIP: "APNS_VOIP"
  • Readonly APNS_VOIP_SANDBOX: "APNS_VOIP_SANDBOX"
  • Readonly BAIDU: "BAIDU"
  • Readonly CUSTOM: "CUSTOM"
  • Readonly EMAIL: "EMAIL"
  • Readonly GCM: "GCM"
  • Readonly IN_APP: "IN_APP"
  • Readonly PUSH: "PUSH"
  • Readonly SMS: "SMS"
  • Readonly VOICE: "VOICE"

Const ChecksumAlgorithm

ChecksumAlgorithm: object

Type declaration

  • Readonly CRC32: "CRC32"
  • Readonly CRC32C: "CRC32C"
  • Readonly SHA1: "SHA1"
  • Readonly SHA256: "SHA256"

Const ChecksumMode

ChecksumMode: object

Type declaration

  • Readonly ENABLED: "ENABLED"

Const DATA

DATA: "Data" = "Data"

Const DATASTORE

DATASTORE: DATASTORE = NAMESPACES.DATASTORE

Const DATE_IN_THE_PAST

DATE_IN_THE_PAST: Date = new Date(0)

Const DB_NAME

DB_NAME: "amplify-datastore" = "amplify-datastore"

Const DB_VERSION

DB_VERSION: 3 = 3

Const DEFAULT_ACCESS_LEVEL

DEFAULT_ACCESS_LEVEL: "guest" = "guest"

Const DEFAULT_APPSYNC_API_SERVICE

DEFAULT_APPSYNC_API_SERVICE: "appsync-api" = "appsync-api"

Const DEFAULT_APP_TYPE

DEFAULT_APP_TYPE: "singlePage" = "singlePage"

Const DEFAULT_CACHE_PREFIX

DEFAULT_CACHE_PREFIX: "personalize" = "personalize"

Const DEFAULT_EVENTS

DEFAULT_EVENTS: ("cancel" | "abort" | "animationcancel" | "animationend" | "animationiteration" | "animationstart" | "auxclick" | "beforeinput" | "blur" | "canplay" | "canplaythrough" | "change" | "click" | "close" | "compositionend" | "compositionstart" | "compositionupdate" | "contextmenu" | "cuechange" | "dblclick" | "drag" | "dragend" | "dragenter" | "dragleave" | "dragover" | "dragstart" | "drop" | "durationchange" | "emptied" | "ended" | "error" | "focus" | "focusin" | "focusout" | "formdata" | "gotpointercapture" | "input" | "invalid" | "keydown" | "keypress" | "keyup" | "load" | "loadeddata" | "loadedmetadata" | "loadstart" | "lostpointercapture" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "pause" | "play" | "playing" | "pointercancel" | "pointerdown" | "pointerenter" | "pointerleave" | "pointermove" | "pointerout" | "pointerover" | "pointerup" | "progress" | "ratechange" | "reset" | "resize" | "scroll" | "securitypolicyviolation" | "seeked" | "seeking" | "select" | "selectionchange" | "selectstart" | "slotchange" | "stalled" | "submit" | "suspend" | "timeupdate" | "toggle" | "touchcancel" | "touchend" | "touchmove" | "touchstart" | "transitioncancel" | "transitionend" | "transitionrun" | "transitionstart" | "volumechange" | "waiting" | "webkitanimationend" | "webkitanimationiteration" | "webkitanimationstart" | "webkittransitionend" | "wheel")[] = ['click'] as DOMEvent[]

Const DEFAULT_EVENT_NAME

DEFAULT_EVENT_NAME: "pageView" = "pageView"

Const DEFAULT_IAM_SIGNING_REGION

DEFAULT_IAM_SIGNING_REGION: "us-east-1" = "us-east-1"

Const DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT

DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT: number = 65 * 1000

Default Time in milleseconds to alert for missed GQL_CONNECTION_KEEP_ALIVE message Default Time in milleseconds to alert for missed GQL_CONNECTION_KEEP_ALIVE message

Const DEFAULT_KEEP_ALIVE_TIMEOUT

DEFAULT_KEEP_ALIVE_TIMEOUT: number = 5 * 60 * 1000

Default Time in milleseconds to wait for GQL_CONNECTION_KEEP_ALIVE message Default Time in milleseconds to wait for GQL_CONNECTION_KEEP_ALIVE message

Const DEFAULT_MAX_DELAY_MS

DEFAULT_MAX_DELAY_MS: number = 5 * 60 * 1000

Const DEFAULT_PART_SIZE

DEFAULT_PART_SIZE: number = 5 * MiB

Const DEFAULT_PRESIGN_EXPIRATION

DEFAULT_PRESIGN_EXPIRATION: 900 = 900

Const DEFAULT_PRIMARY_KEY_VALUE_SEPARATOR

DEFAULT_PRIMARY_KEY_VALUE_SEPARATOR: "#" = "#"

Used by the Async Storage Adapter to concatenate key values for a record. For instance, if a model has the following keys: customId: ID! @primaryKey(sortKeyFields: ["createdAt"]), we concatenate the customId and createdAt as: 12-234-5#2022-09-28T00:00:00.000Z

Const DEFAULT_PROVIDER

DEFAULT_PROVIDER: "AmazonLocationService" = "AmazonLocationService"

Const DEFAULT_QUEUE_SIZE

DEFAULT_QUEUE_SIZE: 4 = 4

Const DEFAULT_REST_IAM_SIGNING_SERVICE

DEFAULT_REST_IAM_SIGNING_SERVICE: "execute-api" = "execute-api"

Const DEFAULT_RETRY_ATTEMPTS

DEFAULT_RETRY_ATTEMPTS: 3 = 3

Const DEFAULT_SELECTOR_PREFIX

DEFAULT_SELECTOR_PREFIX: "data-amplify-analytics-" = "data-amplify-analytics-"

Const DELIMITER

DELIMITER: "." = "."

Const DELIVERY_TYPE

DELIVERY_TYPE: "IN_APP_MESSAGE" = "IN_APP_MESSAGE"

Const DEVICE_METADATA_NOT_FOUND_EXCEPTION

DEVICE_METADATA_NOT_FOUND_EXCEPTION: "DeviceMetadataNotFoundException" = "DeviceMetadataNotFoundException"

Const DISCARD

DISCARD: unique symbol = Symbol('DISCARD')

Const DOMAIN_PATTERN

DOMAIN_PATTERN: RegExp = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/

Const DOTS_PATTERN

DOTS_PATTERN: RegExp = /\.\./

Const DimensionType

DimensionType: object

Type declaration

  • Readonly EXCLUSIVE: "EXCLUSIVE"
  • Readonly INCLUSIVE: "INCLUSIVE"

Const EMPTY_HASH

EMPTY_HASH: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Const EXPIRES_QUERY_PARAM

EXPIRES_QUERY_PARAM: "X-Amz-Expires" = "X-Amz-Expires"

Const EncodingType

EncodingType: object

Type declaration

  • Readonly url: "url"

Const ExpoSQLiteAdapter

ExpoSQLiteAdapter: CommonSQLiteAdapter = new CommonSQLiteAdapter(new ExpoSQLiteDatabase())

Const FIELD_IR

FIELD_IR: "" = ""

Const FIVE_MINUTES_IN_MS

FIVE_MINUTES_IN_MS: number = 1000 * 60 * 5

Date & time utility functions to abstract the aws-sdk away from users. (v2 => v3 modularization is a breaking change)

see

https://github.com/aws/aws-sdk-js/blob/6edf586dcc1de7fe8fbfbbd9a0d2b1847921e6e1/lib/util.js#L262

Const FLUSH_INTERVAL

FLUSH_INTERVAL: number = 5 * 1000

Const FLUSH_SIZE

FLUSH_SIZE: 100 = 100

Const FORBIDDEN_HEADERS

FORBIDDEN_HEADERS: string[] = ['host']

Const FilterType

FilterType: object

Type declaration

  • Readonly ENDPOINT: "ENDPOINT"
  • Readonly SYSTEM: "SYSTEM"

Const Geo

Geo: GeoClass = new GeoClass()

Const GiB

GiB: number = 1024 * MiB

Const GraphQLAPI

GraphQLAPI: GraphQLAPIClass = new GraphQLAPIClass()

Const HEX_MSB_REGEX

HEX_MSB_REGEX: RegExp = /^[89a-f]/i

Tests if a hex string has it most significant bit set (case-insensitive regex)

Const HEX_TO_SHORT

HEX_TO_SHORT: Record<string, number>

Const HOST_HEADER

HOST_HEADER: "host" = "host"

Const Hub

Hub: HubClass = new HubClass('__default__')

Const HubInternal

HubInternal: HubClass = new HubClass('internal-hub')
internal

Internal hub used for core Amplify functionality. Not intended for use outside of Amplify.

Const ID

ID: "id" = "id"

Const IDENTIFIER_KEY_SEPARATOR

IDENTIFIER_KEY_SEPARATOR: "-" = "-"

Used for generating spinal-cased index name from an array of key field names. E.g. for keys [id, title] => 'id-title'

Const IDENTIFY_EVENT_TYPE

IDENTIFY_EVENT_TYPE: "Identify" = "Identify"

Const INIT_N

INIT_N: string = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1' +'29024E088A67CC74020BBEA63B139B22514A08798E3404DD' +'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245' +'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED' +'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D' +'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F' +'83655D23DCA3AD961C62F356208552BB9ED529077096966D' +'670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B' +'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9' +'DE2BCBF6955817183995497CEA956AE515D2261898FA0510' +'15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64' +'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7' +'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B' +'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C' +'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31' +'43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF'

Const INVALID_ORIGIN_EXCEPTION

INVALID_ORIGIN_EXCEPTION: "InvalidOriginException" = "InvalidOriginException"

Const INVALID_PARAMETER_ERROR_MSG

INVALID_PARAMETER_ERROR_MSG: "Invalid parameter for ComplteMultipartUpload API" = "Invalid parameter for ComplteMultipartUpload API"

Const INVALID_REDIRECT_EXCEPTION

INVALID_REDIRECT_EXCEPTION: "InvalidRedirectException" = "InvalidRedirectException"

Const IOT_SERVICE_NAME

IOT_SERVICE_NAME: "iotdevicegateway" = "iotdevicegateway"

Const IP_ADDRESS_PATTERN

IP_ADDRESS_PATTERN: RegExp = /(\d+\.){3}\d+/

Const InternalAPI

InternalAPI: InternalAPIClass = new InternalAPIClass()

Const InternalGraphQLAPI

InternalGraphQLAPI: InternalGraphQLAPIClass = new InternalGraphQLAPIClass()

Const KEY_TYPE_IDENTIFIER

KEY_TYPE_IDENTIFIER: "aws4_request" = "aws4_request"

Const LANGUAGES_CODE_IN_8KHZ

LANGUAGES_CODE_IN_8KHZ: string[] = ['fr-FR', 'en-AU', 'en-GB', 'fr-CA']

Const LINKING_ERROR

LINKING_ERROR: string = `The ${PACKAGE_NAME} package doesn't seem to be linked. Make sure: \n\n` +Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +'- You rebuilt the app after installing the package\n' +'- You are not using Expo Go\n'

Const LOCAL_TESTING_S3_ENDPOINT

LOCAL_TESTING_S3_ENDPOINT: "http://localhost:20005" = "http://localhost:20005"

Const Layout

Layout: object

Type declaration

  • Readonly BOTTOM_BANNER: "BOTTOM_BANNER"
  • Readonly CAROUSEL: "CAROUSEL"
  • Readonly MIDDLE_BANNER: "MIDDLE_BANNER"
  • Readonly MOBILE_FEED: "MOBILE_FEED"
  • Readonly OVERLAYS: "OVERLAYS"
  • Readonly TOP_BANNER: "TOP_BANNER"

Const MAX_ATTEMPTS

MAX_ATTEMPTS: 10 = 10

Const MAX_AUTOSIGNIN_POLLING_MS

MAX_AUTOSIGNIN_POLLING_MS: number = 3 * 60 * 1000

Const MAX_DELAY_MS

MAX_DELAY_MS: 5000 = 5000

Const MAX_DEVICES

MAX_DEVICES: 60 = 60

Const MAX_OBJECT_SIZE

MAX_OBJECT_SIZE: number = 5 * TiB

Const MAX_PAGE_SIZE

MAX_PAGE_SIZE: 1000 = 1000

Const MAX_PARTS_COUNT

MAX_PARTS_COUNT: 10000 = 10000

Const MAX_RETRY_DELAY_MS

MAX_RETRY_DELAY_MS: number = 5 * 60 * 1000

Const MAX_URL_EXPIRATION

MAX_URL_EXPIRATION: number = 7 * 24 * 60 * 60 * 1000

Const MEDIA_AUTO_TRACK_EVENT_TYPE

MEDIA_AUTO_TRACK_EVENT_TYPE: "MediaAutoTrack" = "MediaAutoTrack"

Const MEMORY_KEY_PREFIX

MEMORY_KEY_PREFIX: "@MemoryStorage:" = "@MemoryStorage:"

Const MESSAGE_DAILY_COUNT_KEY

MESSAGE_DAILY_COUNT_KEY: "pinpointProvider_inAppMessages_dailyCount" = "pinpointProvider_inAppMessages_dailyCount"

Const MESSAGE_TOTAL_COUNT_KEY

MESSAGE_TOTAL_COUNT_KEY: "pinpointProvider_inAppMessages_totalCount" = "pinpointProvider_inAppMessages_totalCount"

Const MONTH_NAMES

MONTH_NAMES: string[] = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec',]

Const MULTI_OR_CONDITION_SCAN_BREAKPOINT

MULTI_OR_CONDITION_SCAN_BREAKPOINT: 7 = 7

The point after which queries composed of multiple simple OR conditions should scan-and-filter instead of individual queries for each condition.

At some point, this should be configurable and/or dynamic based on table size and possibly even on observed average seek latency. For now, it's based on an manual "binary search" for the breakpoint as measured in the unit test suite. This isn't necessarily optimal. But, it's at least derived empirically, rather than theoretically and without any verification!

REMEMBER! If you run more realistic benchmarks and update this value, update this comment so the validity and accuracy of future query tuning exercises can be compared to the methods used to derive the current value. E.g.,

  1. In browser benchmark > unit test benchmark
  2. Multi-browser benchmark > single browser benchmark
  3. Benchmarks of various table sizes > static table size benchmark

etc...

Const MetadataDirective

MetadataDirective: object

Type declaration

  • Readonly COPY: "COPY"
  • Readonly REPLACE: "REPLACE"

Const MiB

MiB: number = 1024 * 1024

Const NETWORK_ERROR_CODE

NETWORK_ERROR_CODE: "ECONNABORTED" = "ECONNABORTED"

Const NETWORK_ERROR_MESSAGE

NETWORK_ERROR_MESSAGE: "Network Error" = "Network Error"

Const NON_RETRYABLE_CODES

NON_RETRYABLE_CODES: number[] = [400, 401, 403]

Const NO_HUBCALLBACK_PROVIDED_EXCEPTION

NO_HUBCALLBACK_PROVIDED_EXCEPTION: "NoHubcallbackProvidedException" = "NoHubcallbackProvidedException"

Const OAUTH_SIGNOUT_EXCEPTION

OAUTH_SIGNOUT_EXCEPTION: "OAuthSignOutException" = "OAuthSignOutException"

Const ONE_HOUR

ONE_HOUR: number = 1000 * 60 * 60

Const ONE_YEAR_IN_MS

ONE_YEAR_IN_MS: number = 365 * 24 * 60 * 60 * 1000

Const ObjectCannedACL

ObjectCannedACL: object

Type declaration

  • Readonly authenticated_read: "authenticated-read"
  • Readonly aws_exec_read: "aws-exec-read"
  • Readonly bucket_owner_full_control: "bucket-owner-full-control"
  • Readonly bucket_owner_read: "bucket-owner-read"
  • Readonly private: "private"
  • Readonly public_read: "public-read"
  • Readonly public_read_write: "public-read-write"

Const ObjectLockLegalHoldStatus

ObjectLockLegalHoldStatus: object

Type declaration

  • Readonly OFF: "OFF"
  • Readonly ON: "ON"

Const ObjectLockMode

ObjectLockMode: object

Type declaration

  • Readonly COMPLIANCE: "COMPLIANCE"
  • Readonly GOVERNANCE: "GOVERNANCE"

Const ObjectStorageClass

ObjectStorageClass: object

Type declaration

  • Readonly DEEP_ARCHIVE: "DEEP_ARCHIVE"
  • Readonly GLACIER: "GLACIER"
  • Readonly GLACIER_IR: "GLACIER_IR"
  • Readonly INTELLIGENT_TIERING: "INTELLIGENT_TIERING"
  • Readonly ONEZONE_IA: "ONEZONE_IA"
  • Readonly OUTPOSTS: "OUTPOSTS"
  • Readonly REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY"
  • Readonly SNOW: "SNOW"
  • Readonly STANDARD: "STANDARD"
  • Readonly STANDARD_IA: "STANDARD_IA"

Const PACKAGE_NAME

PACKAGE_NAME: "@aws-amplify/rtn-web-browser" = "@aws-amplify/rtn-web-browser"

Const PERSONALIZE_CACHE_SESSIONID

PERSONALIZE_CACHE_SESSIONID: "_awsct_sid" = "_awsct_sid"

Const PERSONALIZE_CACHE_USERID

PERSONALIZE_CACHE_USERID: "_awsct_uid" = "_awsct_uid"

Const PERSONALIZE_FLUSH_SIZE_MAX

PERSONALIZE_FLUSH_SIZE_MAX: 10 = 10

Const PINPOINT_KEY_PREFIX

PINPOINT_KEY_PREFIX: "Pinpoint" = "Pinpoint"

Const PREV_URL_STORAGE_KEY

PREV_URL_STORAGE_KEY: "aws-amplify-analytics-prevUrl" = "aws-amplify-analytics-prevUrl"

Const PRIME_FRAMEWORK_DELAY

PRIME_FRAMEWORK_DELAY: 1000 = 1000

Const PROVIDER_NAME

PROVIDER_NAME: "pinpoint" = "pinpoint"

Const Platform

Platform: PlatformBuilder = new PlatformBuilder()

Const PredicateAll

PredicateAll: unique symbol = Symbol('A predicate that matches all records')

Const Predictions

Predictions: PredictionsClass = new PredictionsClass()

Const RECONNECTING_IN

RECONNECTING_IN: 5000 = 5000

Const RECONNECT_DELAY

RECONNECT_DELAY: number = 5 * 1000

Default delay time in milleseconds between when reconnect is triggered vs when it is attempted Default delay time in milleseconds between when reconnect is triggered vs when it is attempted

Const RECONNECT_INTERVAL

RECONNECT_INTERVAL: number = 60 * 1000

Default interval time in milleseconds between when reconnect is re-attempted Default interval time in milleseconds between when reconnect is re-attempted

Const REGION_SET_PARAM

REGION_SET_PARAM: "X-Amz-Region-Set" = "X-Amz-Region-Set"

Const RESEND_LIMIT

RESEND_LIMIT: 5 = 5

Const RETRYABLE_CODES

RETRYABLE_CODES: number[] = [429, 500]

Const ReplicationStatus

ReplicationStatus: object

Type declaration

  • Readonly COMPLETE: "COMPLETE"
  • Readonly FAILED: "FAILED"
  • Readonly PENDING: "PENDING"
  • Readonly REPLICA: "REPLICA"

Const RequestCharged

RequestCharged: object

Type declaration

  • Readonly requester: "requester"

Const RequestPayer

RequestPayer: object

Type declaration

  • Readonly requester: "requester"

Const SELECTION_SET_WILDCARD

SELECTION_SET_WILDCARD: "*" = "*"

Const SEND_DOWNLOAD_PROGRESS_EVENT

SEND_DOWNLOAD_PROGRESS_EVENT: "sendDownloadProgress" = "sendDownloadProgress"

Const SEND_UPLOAD_PROGRESS_EVENT

SEND_UPLOAD_PROGRESS_EVENT: "sendUploadProgress" = "sendUploadProgress"

Const SERVICE_NAME

SERVICE_NAME: "s3" = "s3"

The service name used to sign requests if the API requires authentication. The service name used to sign requests if the API requires authentication. The service name used to sign requests if the API requires authentication. The service name used to sign requests if the API requires authentication. The service name used to sign requests if the API requires authentication.

Const SESSION_START_EVENT

SESSION_START_EVENT: "_session.start" = "_session.start"

Const SESSION_STOP_EVENT

SESSION_STOP_EVENT: "_session.stop" = "_session.stop"

Const SETTING_SCHEMA_VERSION

SETTING_SCHEMA_VERSION: "schemaVersion" = "schemaVersion"

Const SETUP_TOTP_EXCEPTION

SETUP_TOTP_EXCEPTION: "SetUpTOTPException" = "SetUpTOTPException"

Const SHA256_ALGORITHM_IDENTIFIER

SHA256_ALGORITHM_IDENTIFIER: "AWS4-HMAC-SHA256" = "AWS4-HMAC-SHA256"

Const SHORT_TO_HEX

SHORT_TO_HEX: Record<string, string>

Const SIGNATURE_IDENTIFIER

SIGNATURE_IDENTIFIER: "AWS4" = "AWS4"

Const SIGNATURE_QUERY_PARAM

SIGNATURE_QUERY_PARAM: "X-Amz-Signature" = "X-Amz-Signature"

Const SIGNED_HEADERS_QUERY_PARAM

SIGNED_HEADERS_QUERY_PARAM: "X-Amz-SignedHeaders" = "X-Amz-SignedHeaders"

Const SKEW_WINDOW

SKEW_WINDOW: number = 5 * 60 * 1000

Const SQLiteAdapter

SQLiteAdapter: CommonSQLiteAdapter = new CommonSQLiteAdapter(new SQLiteDatabase())

Const SSR_RESET_TIMEOUT

SSR_RESET_TIMEOUT: 10 = 10

Const START_ACK_TIMEOUT

START_ACK_TIMEOUT: 15000 = 15000

Time in milleseconds to wait for GQL_START_ACK message Time in milleseconds to wait for GQL_START_ACK message

Const STORAGE

STORAGE: STORAGE = NAMESPACES.STORAGE

Const STORAGE_KEY_SUFFIX

STORAGE_KEY_SUFFIX: "_inAppMessages" = "_inAppMessages"

Const SYNC

SYNC: SYNC = NAMESPACES.SYNC

Const ServerSideEncryption

ServerSideEncryption: object

Type declaration

  • Readonly AES256: "AES256"
  • Readonly aws_kms: "aws:kms"

Const THROTTLING_ERROR_CODES

THROTTLING_ERROR_CODES: string[] = ['BandwidthLimitExceeded','EC2ThrottledException','LimitExceededException','PriorRequestNotComplete','ProvisionedThroughputExceededException','RequestLimitExceeded','RequestThrottled','RequestThrottledException','SlowDown','ThrottledException','Throttling','ThrottlingException','TooManyRequestsException',]

Const TIMEOUT_ERROR_CODES

TIMEOUT_ERROR_CODES: string[] = ['TimeoutError','RequestTimeout','RequestTimeoutException',]

Const TOKEN_HEADER

TOKEN_HEADER: string = TOKEN_QUERY_PARAM.toLowerCase()

Const TOKEN_QUERY_PARAM

TOKEN_QUERY_PARAM: "X-Amz-Security-Token" = "X-Amz-Security-Token"

Const TaggingDirective

TaggingDirective: object

Type declaration

  • Readonly COPY: "COPY"
  • Readonly REPLACE: "REPLACE"

Const TiB

TiB: number = 1024 * GiB

Const UNSIGNED_PAYLOAD

UNSIGNED_PAYLOAD: "UNSIGNED-PAYLOAD" = "UNSIGNED-PAYLOAD"

Const UPLOADS_STORAGE_KEY

UPLOADS_STORAGE_KEY: "__uploadInProgress" = "__uploadInProgress"

Const USER

USER: USER = NAMESPACES.USER

Const USER_AGENT_HEADER

USER_AGENT_HEADER: "x-amz-user-agent" = "x-amz-user-agent"

Const USER_ALREADY_AUTHENTICATED_EXCEPTION

USER_ALREADY_AUTHENTICATED_EXCEPTION: "UserAlreadyAuthenticatedException" = "UserAlreadyAuthenticatedException"

Const USER_ATTRIBUTES

USER_ATTRIBUTES: "userAttributes." = "userAttributes."

Const USER_UNAUTHENTICATED_EXCEPTION

USER_UNAUTHENTICATED_EXCEPTION: "UserUnAuthenticatedException" = "UserUnAuthenticatedException"

Const V5_HOSTED_UI_KEY

V5_HOSTED_UI_KEY: "amplify-signin-with-hostedUI" = "amplify-signin-with-hostedUI"

Const WEB_RESET_TIMEOUT

WEB_RESET_TIMEOUT: 10 = 10

Const WEEK_NAMES

WEEK_NAMES: string[] = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']

Const __amplify

__amplify: unique symbol = Symbol('amplify')

Const __authMode

__authMode: unique symbol = Symbol('authMode')

Const __authToken

__authToken: unique symbol = Symbol('authToken')

Const __headers

__headers: unique symbol = Symbol('headers')

Const __identifierBrand__

__identifierBrand__: keyof symbol

Each identifier type is represented using nominal types, see: https://basarat.gitbook.io/typescript/main-1/nominaltyping

Const __modelMeta__

__modelMeta__: keyof symbol

Let _i18n

_i18n: I18nClass | null = null

Const abortMultipartUpload

abortMultipartUpload: function = composeServiceApi(s3TransferHandler,abortMultipartUploadSerializer,abortMultipartUploadDeserializer,{ ...defaultConfig, responseType: 'text' })

Type declaration

Const amplifyUuid

amplifyUuid: function = v4

Type declaration

    • (): string
    • Returns string

Let analyticsEnabled

analyticsEnabled: boolean = true

Let appStateListener

appStateListener: NativeEventSubscription | undefined

Const assert

assert: AssertionFunction<PushNotificationValidationErrorCode> = createAssertionFunction(pushNotificationValidationErrorMap,PushNotificationError)

Const associateSoftwareToken

associateSoftwareToken: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<AssociateSoftwareTokenInput>('AssociateSoftwareToken'),buildUserPoolDeserializer<AssociateSoftwareTokenOutput>(),defaultConfig)

Type declaration

Const attachedModelInstances

attachedModelInstances: WeakMap<object, ModelAttachment> = new WeakMap<PersistentModel, ModelAttachment>()

Tells us which data source a model is attached to (lazy loads from).

If Deatched, the model's lazy properties will only ever return properties from memory provided at construction time.

Const authenticatedHandler

authenticatedHandler: (Anonymous function) = composeTransferHandler<[UserAgentOptions, RetryOptions<HttpResponse>, SigningOptions],HttpRequest,HttpResponse,typeof fetchTransferHandler>(fetchTransferHandler, [userAgentMiddleware,retryMiddleware,signingMiddleware,])

Let autoSignIn

autoSignIn: AutoSignInCallback = initialAutoSignIn

Signs a user in automatically after finishing the sign-up process.

This API will automatically sign a user in if the autoSignIn flow has been completed in the following cases:

  • User confirmed their account with a verification code sent to their phone or email (default option).
  • User confirmed their account with a verification link sent to their phone or email. In order to enable this option you need to go to the Amazon Cognito console, look for your userpool, then go to the Messaging tab and enable link mode inside the Verification message option. Finally you need to define the signUpVerificationMethod in your Auth config.
example
 Amplify.configure({
   Auth: {
    Cognito: {
   ...cognitoConfig,
   signUpVerificationMethod: "link" // the default value is "code"
  }
    }});
throws

AutoSignInException - Thrown when the autoSignIn flow has not started, or has been cancelled/completed.

returns

The signInOutput.

example
 // handleSignUp.ts
async function handleSignUp(
  username:string,
  password:string
){
  try {
    const { nextStep } = await signUp({
      username,
      password,
      options: {
        userAttributes:{ email:'email@email.com'},
        autoSignIn: true // This enables the auto sign-in flow.
      },
    });

    handleSignUpStep(nextStep);

  } catch (error) {
    console.log(error);
  }
}

// handleConfirmSignUp.ts
async function handleConfirmSignUp(username:string, confirmationCode:string) {
  try {
    const { nextStep } = await confirmSignUp({
      username,
      confirmationCode,
    });

    handleSignUpStep(nextStep);
  } catch (error) {
    console.log(error);
  }
}

// signUpUtils.ts
async function handleSignUpStep( step: SignUpOutput["nextStep"]) {
switch (step.signUpStep) {
  case "CONFIRM_SIGN_UP":

   // Redirect end-user to confirm-sign up screen.

  case "COMPLETE_AUTO_SIGN_IN":
       const codeDeliveryDetails = step.codeDeliveryDetails;
    if (codeDeliveryDetails) {
     // Redirect user to confirm-sign-up with link screen.
    }
    const signInOutput = await autoSignIn();
  // handle sign-in steps
}

Let autoSignInStarted

autoSignInStarted: boolean = false

Const autoSignInUserConfirmed

autoSignInUserConfirmed: autoSignInWithCode = autoSignInWithCode

Const cachedClients

cachedClients: Record<string, PersonalizeEventsClient>

Const canary

canary: 244837814094590 = 244837814094590

Const cancelTokenMap

cancelTokenMap: WeakMap<Promise<any>, AbortController> = new WeakMap<Promise<any>, AbortController>()

This weak map provides functionality to cancel a request given the promise containing the post request.

  1. For every GraphQL POST request, an abort controller is created and supplied to the request.
  2. The promise fulfilled by GraphGL POST request is then mapped to that abort controller.
  3. The promise is returned to the external caller.
  4. The caller can either wait for the promise to fulfill or call cancel(promise) to cancel the request.
  5. If cancel(promise) is called, then the corresponding abort controller is retrieved from the map below.
  6. GraphQL POST request will be rejected with the error message provided during cancel.
  7. Caller can check if the error is because of cancelling by calling isCancelError(error).

Const changePassword

changePassword: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<ChangePasswordInput>('ChangePassword'),buildUserPoolDeserializer<ChangePasswordOutput>(),defaultConfig)

Type declaration

Const cognitoCredentialsProvider

cognitoCredentialsProvider: CognitoAWSCredentialsAndIdentityIdProvider = new CognitoAWSCredentialsAndIdentityIdProvider(new DefaultIdentityIdStore(defaultStorage))

Cognito specific implmentation of the CredentialsProvider interface that manages setting and getting of AWS Credentials.

throws

configuration expections:

  • Auth errors that may arise from misconfiguration.
throws

service expections: GetCredentialsForIdentityException, GetIdException

Const cognitoIdentityTransferHandler

cognitoIdentityTransferHandler: (Anonymous function) = composeTransferHandler<[Parameters<typeof disableCacheMiddleware>[0]],HttpRequest,HttpResponse,typeof unauthenticatedHandler>(unauthenticatedHandler, [disableCacheMiddleware])

A Cognito Identity-specific transfer handler that does NOT sign requests, and disables caching.

internal

Const cognitoUserPoolTransferHandler

cognitoUserPoolTransferHandler: function = composeTransferHandler<[Parameters<typeof disableCacheMiddleware>[0]],HttpRequest,HttpResponse,typeof unauthenticatedHandler>(unauthenticatedHandler, [disableCacheMiddleware])

A Cognito Identity-specific transfer handler that does NOT sign requests, and disables caching. A Cognito Identity-specific transfer handler that does NOT sign requests, and disables caching.

internal
internal

Type declaration

Const cognitoUserPoolsTokenProvider

cognitoUserPoolsTokenProvider: CognitoUserPoolsTokenProvider = new CognitoUserPoolsTokenProvider()

Const comparisonKeys

comparisonKeys: Set<string> = new Set(['eq','ne','gt','lt','ge','le','contains','notContains','beginsWith','between',])

The valid comparison operators that can be used as keys in a predicate comparison object.

Const completeMultipartUpload

completeMultipartUpload: function = composeServiceApi(s3TransferHandler,completeMultipartUploadSerializer,completeMultipartUploadDeserializer,{...defaultConfig,responseType: 'text',retryDecider: retryWhenErrorWith200StatusCode,})

Type declaration

Const configuredTrackers

configuredTrackers: Partial<Record<TrackerType, TrackerInterface>>

Const confirmDevice

confirmDevice: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<ConfirmDeviceInput>('ConfirmDevice'),buildUserPoolDeserializer<ConfirmDeviceOutput>(),defaultConfig)

Type declaration

Const confirmForgotPassword

confirmForgotPassword: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<ConfirmForgotPasswordInput>('ConfirmForgotPassword'),buildUserPoolDeserializer<ConfirmForgotPasswordOutput>(),defaultConfig)

Type declaration

Const confirmSignUp

Let conflictHandler

conflictHandler: InAppMessageConflictHandler = defaultConflictHandler

Const copyObject

copyObject: function = composeServiceApi(s3TransferHandler,copyObjectSerializer,copyObjectDeserializer,{ ...defaultConfig, responseType: 'text' })

Type declaration

Const createDownloadTask

createDownloadTask: createCancellableTask = createCancellableTask

Const createMultipartUpload

createMultipartUpload: function = composeServiceApi(s3TransferHandler,createMultipartUploadSerializer,createMultipartUploadDeserializer,{ ...defaultConfig, responseType: 'text' })

Type declaration

Const currentSizeKey

currentSizeKey: "CurSize" = "CurSize"

Const customDomainPath

customDomainPath: "/realtime" = "/realtime"

Const customUserAgentState

customUserAgentState: CustomUserAgentStateMap

Let dataStoreClasses

dataStoreClasses: TypeConstructorMap

Let dbits

dbits: number

Const debouncedAutoSignInWithLink

debouncedAutoSignInWithLink: (Anonymous function) = debounce(handleAutoSignInWithLink, 300)

Const debouncedAutoSignWithCodeOrUserConfirmed

debouncedAutoSignWithCodeOrUserConfirmed: (Anonymous function) = debounce(handleAutoSignInWithCodeOrUserConfirmed,300)

decode

decode: decode

Const defaultStorage

defaultStorage: DefaultStorage = new DefaultStorage()

Const deleteObject

deleteObject: function = composeServiceApi(s3TransferHandler,deleteObjectSerializer,deleteObjectDeserializer,{ ...defaultConfig, responseType: 'text' })

Type declaration

Const deleteUser

Const deleteUserAttributes

Const detectionMap

detectionMap: PlatformDetectionEntry[] = [// First, detect mobile{ platform: Framework.Expo, detectionMethod: expoDetect },{ platform: Framework.ReactNative, detectionMethod: reactNativeDetect },// Next, detect web frameworks{ platform: Framework.NextJs, detectionMethod: nextWebDetect },{ platform: Framework.Nuxt, detectionMethod: nuxtWebDetect },{ platform: Framework.Angular, detectionMethod: angularWebDetect },{ platform: Framework.React, detectionMethod: reactWebDetect },{ platform: Framework.VueJs, detectionMethod: vueWebDetect },{ platform: Framework.Svelte, detectionMethod: svelteWebDetect },{ platform: Framework.WebUnknown, detectionMethod: webDetect },// Last, detect ssr frameworks{ platform: Framework.NextJsSSR, detectionMethod: nextSSRDetect },{ platform: Framework.NuxtSSR, detectionMethod: nuxtSSRDetect },{ platform: Framework.ReactSSR, detectionMethod: reactSSRDetect },{ platform: Framework.VueJsSSR, detectionMethod: vueSSRDetect },{ platform: Framework.AngularSSR, detectionMethod: angularSSRDetect },{ platform: Framework.SvelteSSR, detectionMethod: svelteSSRDetect },]

Const disable

disable: disableAnalytics = disableAnalytics

Disables the Analytics category.

note

When Analytics is disabled events will not be buffered or transmitted to your selected service. Any auto-tracking behavior that you have configured via configureAutoTrack will not have any effect while Analytics is disabled.

Const enable

enable: enableAnalytics = enableAnalytics

Enables the Analytics category to permit the transmission of events.

note

Analytics is enabled by default. You do not need to call this API unless you have disabled Analytics.

encode

encode: encode

Let eventAttributesMemo

eventAttributesMemo: Record<string, boolean>

Const eventBufferMap

eventBufferMap: Record<string, Record<string, PinpointEventBuffer>>

These Records hold cached event buffers and AWS clients. The hash key is determined by the region and session, consisting of a combined value comprising [region, sessionToken, identityId]. These Records hold cached event buffers and AWS clients. The hash key is determined by the region and session, consisting of a combined value comprising [region, sessionToken, identityId]. These Records hold cached event buffers and AWS clients. The hash key is determined by the region and session, consisting of a combined value comprising [region, sessionToken, identityId].

Only one active session should exist at any given moment. When a new session is initiated, the previous ones should be released.

Only one active session should exist at any given moment. When a new session is initiated, the previous ones should be released.

Only one active session should exist at any given moment. When a new session is initiated, the previous ones should be released.

Const eventBuilder

eventBuilder: EventStreamCodec = new EventStreamCodec(toUtf8, fromUtf8)

Const eventListeners

eventListeners: Record<string, Set<EventListener<Function>>>

Let eventMetricsMemo

eventMetricsMemo: Record<string, boolean>

Let eventNameMemo

eventNameMemo: Record<string, boolean>

Const forgetDevice

Const forgotPassword

forgotPassword: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<ForgotPasswordInput>('ForgotPassword'),buildUserPoolDeserializer<ForgotPasswordOutput>(),defaultConfig)

Type declaration

Let frameworkCache

frameworkCache: Framework | undefined

Const frameworkChangeObservers

frameworkChangeObservers: function[] = []

getBadgeCountNative

getBadgeCountNative: function

Type declaration

    • (): void | Promise<number | null>
    • Returns void | Promise<number | null>

Const getCredentialsForIdentity

getCredentialsForIdentity: (Anonymous function) = composeServiceApi(cognitoIdentityTransferHandler,getCredentialsForIdentitySerializer,getCredentialsForIdentityDeserializer,defaultConfig)
internal

Const getGroupId

getGroupId: (Anonymous function) = (() => {let seed = 1;return () => `group_${seed++}`;})()

Small utility function to generate a monotonically increasing ID. Used by GroupCondition to help keep track of which group is doing what, when, and where during troubleshooting.

Const getId

getId: (Anonymous function) = composeServiceApi(cognitoIdentityTransferHandler,getIdSerializer,getIdDeserializer,defaultConfig)
internal

Const getInAppMessages

getInAppMessages: (Anonymous function) = composeServiceApi(authenticatedHandler,getInAppMessagesSerializer,getInAppMessagesDeserializer,defaultConfig)
internal

getLaunchNotificationNative

getLaunchNotificationNative: function

Type declaration

    • (): Promise<PushNotificationMessage | null>
    • Returns Promise<PushNotificationMessage | null>

Const getObject

getObject: function = composeServiceApi(s3TransferHandler,getObjectSerializer,getObjectDeserializer,{ ...defaultConfig, responseType: 'blob' })

Type declaration

getPermissionStatusNative

getPermissionStatusNative: function

Type declaration

    • (): Promise<"denied" | "granted" | "shouldRequest" | "shouldExplainThenRequest">
    • Returns Promise<"denied" | "granted" | "shouldRequest" | "shouldExplainThenRequest">

Const getUser

getUser: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<GetUserInput>('GetUser'),buildUserPoolDeserializer<GetUserOutput>(),defaultConfig)

Type declaration

Const getUserAttributeVerificationCode

getUserAttributeVerificationCode: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<GetUserAttributeVerificationCodeInput>('GetUserAttributeVerificationCode'),buildUserPoolDeserializer<GetUserAttributeVerificationCodeOutput>(),defaultConfig)

Type declaration

Const globalSignOut

Const graphQLDocumentsCache

graphQLDocumentsCache: Map<string, Map<"CREATE" | "READ" | "UPDATE" | "DELETE" | "LIST" | "ONCREATE" | "ONUPDATE" | "ONDELETE" | "OBSERVE_QUERY", string>> = new Map<string, Map<ModelOperation, string>>()

Const groupKeys

groupKeys: Set<string> = new Set(['and', 'or', 'not'])

The valid logical grouping keys for a predicate group.

Const headObject

headObject: function = composeServiceApi(s3TransferHandler,headObjectSerializer,headObjectDeserializer,{ ...defaultConfig, responseType: 'text' })

Type declaration

Const inBrowser

inBrowser: boolean = typeof navigator !== 'undefined'

Let inflightPromiseResolvers

inflightPromiseResolvers: function[] = []

Const initPatches

initPatches: WeakMap<object, Patch[]> = new WeakMap<PersistentModel, Patch[]>()

Records the patches (as if against an empty object) used to initialize an instance of a Model. This can be used for determining which fields to send to the cloud durnig a CREATE mutation.

Let initialized

initialized: boolean = false

Const initiateAuth

initiateAuth: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<InitiateAuthInput>('InitiateAuth'),buildUserPoolDeserializer<InitiateAuthOutput>(),defaultConfig)

Type declaration

Const instance

instance: DataStore = new DataStore()

Const instancesMetadata

instancesMetadata: WeakSet<object & object> = new WeakSet<ModelInit<any, any>>()

Collection of instantiated models to allow storage of metadata apart from the model visible to the consuming app -- in case the app doesn't have metadata fields (_version, _deleted, etc.) exposed on the model itself.

Const invalidOriginException

invalidOriginException: AuthError = new AuthError({name: INVALID_ORIGIN_EXCEPTION,message:'redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin',recoverySuggestion: 'Please call signInWithRedirect from the same origin.',})

Const invalidRedirectException

invalidRedirectException: AuthError = new AuthError({name: INVALID_REDIRECT_EXCEPTION,message:'signInRedirect or signOutRedirect had an invalid format or was not found.',recoverySuggestion:'Please make sure the signIn/Out redirect in your oauth config is valid.',})

Const isAndroid

isAndroid: boolean = operatingSystem === 'android'

Const isIos

isIos: boolean = operatingSystem === 'ios'

Const j_lm

j_lm: boolean = (canary & 0xffffff) === 0xefcafe

Const lexProvider

lexProvider: AWSLexProvider = new AWSLexProvider()

Const listDevices

listDevices: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<ListDevicesInput>('ListDevices'),buildUserPoolDeserializer<ListDevicesOutput>(),defaultConfig)

Type declaration

Const listObjectsV2

listObjectsV2: function = composeServiceApi(s3TransferHandler,listObjectsV2Serializer,listObjectsV2Deserializer,{ ...defaultConfig, responseType: 'text' })

Type declaration

Const listParts

listParts: function = composeServiceApi(s3TransferHandler,listPartsSerializer,listPartsDeserializer,{ ...defaultConfig, responseType: 'text' })

Type declaration

Const logger

logger: ConsoleLogger = new ConsoleLogger('Storage')

NOTE!

This is used only by DataStore.

This can probably be pruned and/or removed. Just leaving it as much of the same state as possible for V6 to reduce number of potentially impactful changes to DataStore.

Const metadataFields

metadataFields: ("_version" | "_lastChangedAt" | "_deleted")[] = <(keyof ModelInstanceMetadata)[]>(Object.keys(dummyMetadata))

Const modelInstanceAssociationsMap

modelInstanceAssociationsMap: WeakMap<object, object> = new WeakMap<PersistentModel, object>()

Maps a model to its related models for memoization/immutability.

Const modelNamespaceMap

modelNamespaceMap: WeakMap<object, string> = new WeakMap<PersistentModelConstructor<any>,string>()

Const modelPatchesMap

modelPatchesMap: WeakMap<object, [Patch[], object]> = new WeakMap<PersistentModel,[Patch[], PersistentModel]>()

Stores data for crafting the correct update mutation input for a model.

  • Patch[] - array of changed fields and metadata.
  • PersistentModel - the source model, used for diffing object-type fields.

Const monotonicFactoriesMap

monotonicFactoriesMap: Map<string, ULID> = new Map<string, ULID>()

Const name

name: "CognitoIdentityServiceProvider" = "CognitoIdentityServiceProvider"

Const nativeEventEmitter

nativeEventEmitter: NativeEventEmitter = new NativeEventEmitter(nativeModule)

Const nativeModule

nativeModule: WebBrowserNativeModule = NativeModules.AmplifyRTNWebBrowser? NativeModules.AmplifyRTNWebBrowser: new Proxy({},{get() {throw new Error(LINKING_ERROR);},})

Const nonModelClasses

nonModelClasses: WeakSet<object> = new WeakSet<NonModelTypeConstructor<any>>()

Const operatingSystem

operatingSystem: "android" | "ios" | "macos" | "windows" | "web" = getOperatingSystem()

Const ops

ops: ("beginsWith" | "contains" | "notContains" | "between" | "eq" | "ne" | "le" | "lt" | "ge" | "gt")[] = [...comparisonKeys] as AllFieldOperators[]

Const originalJitteredBackoff

originalJitteredBackoff: function = jitteredBackoff(MAX_RETRY_DELAY_MS)

Type declaration

    • (attempt: number, args?: any[], error?: unknown): number | false
    • Parameters

      • attempt: number
      • Optional args: any[]
      • Optional error: unknown

      Returns number | false

Const ownSymbol

ownSymbol: unique symbol = Symbol('sync')

Const predicateInternalsMap

predicateInternalsMap: Map<PredicateInternalsKey, GroupCondition> = new Map<PredicateInternalsKey, GroupCondition>()

A map from keys (exposed to customers) to the internal predicate data structures invoking code should not muck with.

Const predicatesAllSet

predicatesAllSet: WeakSet<function> = new WeakSet<ProducerModelPredicate<any>>()

Let privateModeCheckResult

privateModeCheckResult: any

Const putEvents

putEvents: (Anonymous function) = composeServiceApi(authenticatedHandler,putEventsSerializer,putEventsDeserializer,defaultConfig)
internal

Const putObject

putObject: function = composeServiceApi(s3TransferHandler,putObjectSerializer,putObjectDeserializer,{ ...defaultConfig, responseType: 'text' })

Type declaration

Const queryType

queryType: keyof symbol

Let redirectListener

redirectListener: NativeEventSubscription | undefined

requestPermissionsNative

requestPermissionsNative: function

Type declaration

    • (__namedParameters?: object): Promise<boolean>
    • Parameters

      • Optional __namedParameters: object
        • alert: boolean
        • badge: boolean
        • sound: boolean

      Returns Promise<boolean>

Const resendConfirmationCode

resendConfirmationCode: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<ResendConfirmationCodeInput>('ResendConfirmationCode'),buildUserPoolDeserializer<ResendConfirmationCodeOutput>(),defaultConfig)

Type declaration

Let resetTriggered

resetTriggered: boolean = false

Const respondToAuthChallenge

respondToAuthChallenge: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<RespondToAuthChallengeInput>('RespondToAuthChallenge'),buildUserPoolDeserializer<RespondToAuthChallengeOutput>(),defaultConfig)

Type declaration

Const revokeToken

revokeToken: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<RevokeTokenInput>('RevokeToken'),buildUserPoolDeserializer<RevokeTokenOutput>(),defaultConfig)

Type declaration

Let rr

rr: number

Const s3TransferHandler

s3TransferHandler: typeof s3BrowserTransferhandler = composeTransferHandler<[{}],HttpRequest,HttpResponse,typeof authenticatedHandler>(authenticatedHandler, [contentSha256Middleware])

S3 transfer handler for browser and React Native based on XHR. On top of basic transfer handler, it also supports x-amz-content-sha256 header, and request&response process tracking. S3 transfer handler for node based on Node-fetch. On top of basic transfer handler, it also supports x-amz-content-sha256 header. However, it does not support request&response process tracking like browser.

internal
internal

Let safariCompatabilityModeResult

safariCompatabilityModeResult: any

Let schema

Let session

session: PinpointSession | undefined

Const sessionListener

sessionListener: SessionListener = new SessionListener()

Let sessionMessageCountMap

sessionMessageCountMap: InAppMessageCountMap

Const sessionStorage

sessionStorage: SessionStorage = new SessionStorage()

setBadgeCountNative

setBadgeCountNative: function

Type declaration

    • (count: number): void
    • Parameters

      • count: number

      Returns void

Const setUserMFAPreference

setUserMFAPreference: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<SetUserMFAPreferenceInput>('SetUserMFAPreference'),buildUserPoolDeserializer<SetUserMFAPreferenceOutput>(),defaultConfig)

Type declaration

Const sharedInMemoryStorage

sharedInMemoryStorage: KeyValueStorage = new KeyValueStorage(new InMemoryStorage())

Const signInStore

signInStore: object = createStore(signInReducer)

Type declaration

Const signUp

  • Creates a user

    throws

    service: - Cognito service errors thrown during the sign-up process.

    throws

    validation: - Validation errors thrown either username or password are not defined.

    throws

    AuthTokenConfigException - Thrown when the token provider config is invalid.

    Parameters

    Returns Promise<SignUpOutput>

    SignUpOutput

Const standardDomainPattern

standardDomainPattern: RegExp = /^https:\/\/\w{26}\.appsync\-api\.\w{2}(?:(?:\-\w{2,})+)\-\d\.amazonaws.com(?:\.cn)?\/graphql$/i

Const stateChangeListeners

stateChangeListeners: Set<function> = new Set<SessionStateChangeListener>()

Const storage

storage: WeakMap<object, object> = new WeakMap<AmplifyServer.ContextToken,AmplifyServer.Context>()

Let storageClasses

storageClasses: TypeConstructorMap

Const store

store: DefaultOAuthStore = new DefaultOAuthStore(defaultStorage)

Let syncClasses

syncClasses: TypeConstructorMap

Let syncSubscription

syncSubscription: SubscriptionLike

Let token

token: string

Const tokenOrchestrator

tokenOrchestrator: TokenOrchestrator = cognitoUserPoolsTokenProvider.tokenOrchestrator

Const topicSymbol

topicSymbol: symbol | "@@topic" = typeof Symbol !== 'undefined' ? Symbol('topic') : '@@topic'

Const topologicallySortedModels

topologicallySortedModels: WeakMap<object & object, string[]> = new WeakMap<SchemaNamespace, string[]>()

Const ulid

ulid: ULID = monotonicUlidFactory(Date.now())

Const unauthenticatedHandler

unauthenticatedHandler: (Anonymous function) = composeTransferHandler<[UserAgentOptions, RetryOptions<HttpResponse>],HttpRequest,HttpResponse,typeof fetchTransferHandler>(fetchTransferHandler, [userAgentMiddleware, retryMiddleware])

Const updateDeviceStatus

updateDeviceStatus: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<UpdateDeviceStatusInput>('UpdateDeviceStatus'),buildUserPoolDeserializer<UpdateDeviceStatusOutput>(),defaultConfig)

Type declaration

Const uploadPart

uploadPart: function = composeServiceApi(s3TransferHandler,uploadPartSerializer,uploadPartDeserializer,{ ...defaultConfig, responseType: 'text' })

Type declaration

Let userClasses

userClasses: TypeConstructorMap

Let usernameUsedForAutoSignIn

usernameUsedForAutoSignIn: string | undefined

Const verifySoftwareToken

verifySoftwareToken: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<VerifySoftwareTokenInput>('VerifySoftwareToken'),buildUserPoolDeserializer<VerifySoftwareTokenOutput>(),defaultConfig)

Type declaration

Const verifyUserAttribute

verifyUserAttribute: function = composeServiceApi(cognitoUserPoolTransferHandler,buildUserPoolSerializer<VerifyUserAttributeInput>('VerifyUserAttribute'),buildUserPoolDeserializer<VerifyUserAttributeOutput>(),defaultConfig)

Type declaration

Const version

version: "6.0.9" = "6.0.9"

Let vv

vv: number

Functions

BigInteger

  • BigInteger(a?: any, b?: any): void

Const DEFAULT_URL_PROVIDER

  • DEFAULT_URL_PROVIDER(): string

Montgomery

  • Montgomery(m: object): void

Const ReachabilityMonitor

  • ReachabilityMonitor(): Observable<object>
  • ReachabilityMonitor(): Observable<object>
  • ReachabilityMonitor(): Observable<object>
  • ReachabilityMonitor(): Observable<object>

_get

_getPredictionsIdentifyAmplifyUserAgent

  • _getPredictionsIdentifyAmplifyUserAgent(): [string, string][]

Const _list

Const _listAll

Const abortMultipartUploadDeserializer

Const abortMultipartUploadSerializer

Const addAnalyticsListeners

  • addAnalyticsListeners(): void

Const addEventListener

Const addMessageEventListener

  • addMessageEventListener(event: string, listener: function): EmitterSubscription

Const addNativeListeners

  • addNativeListeners(): void

Const addOrIncrementMetadataAttempts

  • addOrIncrementMetadataAttempts(nextHandlerOutput: Record<string, any>, attempts: number): void

Const addTokenEventListener

  • addTokenEventListener(event: string, listener: function): EmitterSubscription

am1

  • am1(i: number, x: number, w: number, j: number, c: number, n: number): number

am2

  • am2(i: number, x: number, w: number, j: number, c: number, n: number): number

am3

  • am3(i: number, x: number, w: number, j: number, c: number, n: number): number

analyticsListener

  • analyticsListener(__namedParameters: object): void

angularSSRDetect

  • angularSSRDetect(): boolean

angularWebDetect

  • angularWebDetect(): boolean

assertAuthTokens

  • assertAuthTokens(tokens?: AuthTokens | null): tokens

assertAuthTokensWithRefreshToken

Const assertContextSpec

assertDeviceMetadata

  • assertDeviceMetadata(deviceMetadata?: DeviceMetadata | null): deviceMetadata

assertIdTokenInAuthTokens

  • assertIdTokenInAuthTokens(tokens?: AuthTokens): tokens

assertIdentityPoolIdConfig

Const assertIsInitialized

  • assertIsInitialized(): void
  • assertIsInitialized(): void

assertOAuthConfig

  • assertOAuthConfig(cognitoConfig?: AuthConfig["Cognito"]): cognitoConfig

assertServiceError

  • assertServiceError(error: unknown): error

assertTokenProviderConfig

assertUserNotAuthenticated

  • assertUserNotAuthenticated(): Promise<void>

assertUserPoolAndIdentityPoolConfig

  • assertUserPoolAndIdentityPoolConfig(authConfig: AuthConfig): authConfig

assertValidationError

Const assignStringVariables

  • assignStringVariables(values: Record<string, object | undefined>): Record<string, string>

asyncEvery

  • asyncEvery(items: Record<string, any>[], matches: function): Promise<boolean>
  • An aysnc implementation of Array.every(). Returns as soon as a non-match is found.

    Parameters

    • items: Record<string, any>[]

      The items to check.

    • matches: function

      The async matcher function, expected to return Promise: true for a matching item, false otherwise.

    Returns Promise<boolean>

    A Promise<boolean>, true if every item matches; false otherwise.

asyncFilter

  • asyncFilter<T>(items: T[], matches: function): Promise<T[]>
  • An async implementation of Array.filter(). Returns after all items have been filtered. TODO: Return AsyncIterable.

    Type parameters

    • T

    Parameters

    • items: T[]

      The items to filter.

    • matches: function

      The async matcher function, expected to return Promise: true for a matching item, false otherwise.

        • Parameters

          • item: T

          Returns Promise<boolean>

    Returns Promise<T[]>

    A Promise<T> of matching items.

asyncSome

  • asyncSome(items: Record<string, any>[], matches: function): Promise<boolean>
  • An aysnc implementation of Array.some(). Returns as soon as a match is found.

    Parameters

    • items: Record<string, any>[]

      The items to check.

    • matches: function

      The async matcher function, expected to return Promise: true for a matching item, false otherwise.

    Returns Promise<boolean>

    A Promise<boolean>, true if "some" items match; false otherwise.

attached

authModeParams

autoSignInWhenUserIsConfirmedWithLink

autoSignInWithCode

Const autoTrackMedia

Const base64ToArrayBuffer

  • base64ToArrayBuffer(base64: string): Uint8Array
  • base64ToArrayBuffer(base64: string): Uint8Array

blobToArrayBuffer

  • blobToArrayBuffer(blob: Blob): Promise<Uint8Array>

bnAbs

  • bnAbs(): any

bnAdd

  • bnAdd(a: number): any

bnBitLength

  • bnBitLength(): number

bnCompareTo

  • bnCompareTo(a: BNP): number

bnDivide

  • bnDivide(a: number): number

bnEquals

  • bnEquals(a: number): boolean

bnMod

  • bnMod(a: any): any

bnModPow

  • bnModPow(e: object, m: object, callback: Function): any

bnMultiply

  • bnMultiply(a: number): number

bnNegate

  • bnNegate(): any

bnSubtract

  • bnSubtract(a: number): number

bnToString

  • bnToString(b: number): string

bnpAddTo

  • bnpAddTo(a: BNP, r: BNP & object): void

bnpClamp

  • bnpClamp(): void

bnpCopyTo

  • bnpCopyTo(r: object): void

bnpDLShiftTo

  • bnpDLShiftTo(n: number, r: BNP): void

bnpDRShiftTo

  • bnpDRShiftTo(n: number, r: BNP): void

bnpDivRemTo

  • bnpDivRemTo(m: BNP & object, q: object, r: BNP & object): void

bnpFromInt

  • bnpFromInt(x: number): void

bnpFromString

  • bnpFromString(s: string, b: number): void

bnpInvDigit

  • bnpInvDigit(): number

bnpLShiftTo

  • bnpLShiftTo(n: number, r: object): void

bnpMultiplyTo

  • bnpMultiplyTo(a: BNP & object, r: BNP & object): void

bnpRShiftTo

  • bnpRShiftTo(n: number, r: BNP & object): void

bnpSquareTo

  • bnpSquareTo(r: any): void

bnpSubTo

  • bnpSubTo(a: BNP, r: BNP & object): void

browserClientInfo

  • browserClientInfo(): object | object

browserTimezone

  • browserTimezone(): string

buildGraphQLOperation

  • buildGraphQLOperation(namespace: SchemaNamespace, modelDefinition: SchemaModel, graphQLOpType: keyof typeof GraphQLOperationType): [][]

buildGraphQLVariables

Const buildHandlerError

  • buildHandlerError(message: string, name: string): Error

Const buildHttpRpcRequest

  • buildHttpRpcRequest(__namedParameters: object, headers: Headers, body: string): HttpRequest
  • buildHttpRpcRequest(__namedParameters: object, headers: Headers, body: any): HttpRequest
  • buildHttpRpcRequest(__namedParameters: object, headers: Headers, body: any): HttpRequest

Const buildRestApiServiceError

Const buildSeedPredicate

  • Creates a predicate without any conditions that can be passed to customer code to have conditions added to it.

    For example, in this query:

    await DataStore.query(
        Model,
        item => item.field.eq('value')
    );

    buildSeedPredicate(Model) is used to create item, which is passed to the predicate function, which in turn uses that "seed" predicate (item) to build a predicate tree.

    Type parameters

    Parameters

    Returns object & object & PredicateInternalsKey

buildSpecialNullComparison

  • buildSpecialNullComparison(field: any, operator: any, operand: any): string
  • If the given (operator, operand) indicate the need for a special NULL comparison, that WHERE clause condition will be returned. If not special NULL handling is needed, null will be returned, and the caller should construct the WHERE clause component using the normal operator map(s) and parameterization.

    Parameters

    • field: any
    • operator: any

      "beginsWith" | "contains" | "notContains" | "between" | "eq" | "ne" | "le" | "lt" | "ge" | "gt"

    • operand: any

      any

    Returns string

    (string | null) The WHERE clause component or null if N/A.

Const buildStorageServiceError

buildSubscriptionGraphQLOperation

Const buildUserPoolDeserializer

  • buildUserPoolDeserializer<Output>(): function

Const buildUserPoolSerializer

  • buildUserPoolSerializer<Input>(operation: ClientOperation): (Anonymous function)

Const byteLength

  • byteLength(input?: any): number | undefined

bytesToBase64

  • bytesToBase64(bytes: Uint8Array): string

bytesToString

  • bytesToString(input: Uint8Array): string

cacheCognitoTokens

Const cacheEndpointId

Const cacheMultipartUpload

  • cacheMultipartUpload(cacheKey: string, fileMetadata: Omit<FileMetadata, "lastTouched">): Promise<void>

Const calculateA

Const calculateContentMd5

  • calculateContentMd5(content: Blob | string | ArrayBuffer | ArrayBufferView): Promise<string>
  • calculateContentMd5(content: Blob | string | ArrayBuffer | ArrayBufferView): Promise<string>

Const calculatePartSize

  • calculatePartSize(totalSize?: number): number

Const calculateS

Const calculateU

Const cancel

Const cancellableSleep

  • cancellableSleep(timeoutMs: number, abortSignal?: AbortSignal): Promise<void>

Const castInstanceType

categorizeRekognitionBlocks

categorizeTextractBlocks

Const checkElementLoaded

  • checkElementLoaded(interval: number, maxTries: number): check

Const checkReadOnlyPropertyOnCreate

  • checkReadOnlyPropertyOnCreate<T>(draft: T, modelDefinition: SchemaModel): void

Const checkReadOnlyPropertyOnUpdate

  • checkReadOnlyPropertyOnUpdate(patches: Patch[], modelDefinition: SchemaModel): void

Const checkSchemaCodegenVersion

  • checkSchemaCodegenVersion(codegenVersion: string): void
  • Throws an exception if the schema is using a codegen version that is not supported.

    Set the supported version by setting majorVersion and minorVersion This functions similar to ^ version range. The tested codegenVersion major version must exactly match the set majorVersion The tested codegenVersion minor version must be gt or equal to the set minorVersion Example: For a min supported version of 5.4.0 set majorVersion = 5 and minorVersion = 4

    This regex will not work when setting a supported range with minor version of 2 or more digits. i.e. minorVersion = 10 will not work The regex will work for testing a codegenVersion with multi digit minor versions as long as the minimum minorVersion is single digit. i.e. codegenVersion = 5.30.1, majorVersion = 5, minorVersion = 4 PASSES

    Parameters

    • codegenVersion: string

      schema codegenVersion

    Returns void

Const checkSchemaInitialized

  • checkSchemaInitialized(): void
  • Throws an exception if the schema has not been initialized by initSchema().

    To be called before trying to access schema.

    Currently this only needs to be called in start() and clear() because all other functions will call start first.

    Returns void

checkSchemaVersion

  • checkSchemaVersion(storage: Storage, version: string): Promise<void>
  • Queries the DataStore metadata tables to see if they are the expected version. If not, clobbers the whole DB. If so, leaves them alone. Otherwise, simply writes the schema version.

    SIDE EFFECT:

    1. Creates a transaction
    2. Updates data.

    Parameters

    • storage: Storage

      Storage adapter containing the metadata.

    • version: string

      The expected schema version.

    Returns Promise<void>

cleanActiveSignInState

  • cleanActiveSignInState(): void

clearCache

  • clearCache(): void

clearCredentials

  • clearCredentials(): Promise<void>

clearHistory

  • clearHistory(redirectUri: string): void

Const clearMemo

  • clearMemo(): void

clearMessages

clientSignOut

cognitoIdentityIdProvider

  • cognitoIdentityIdProvider(__namedParameters: object): Promise<string>

completeFlow

  • completeFlow(__namedParameters: object): Promise<void>

Const completeMultipartUploadDeserializer

Const completeMultipartUploadSerializer

Const completeNotification

  • completeNotification(completionHandlerId: string): void

Const completeOAuthSignOut

Const composeServiceApi

  • composeServiceApi<TransferHandlerOptions, Input, Output, DefaultConfig>(transferHandler: TransferHandler<HttpRequest, HttpResponse, TransferHandlerOptions>, serializer: function, deserializer: function, defaultConfig: Partial<DefaultConfig>): (Anonymous function)

Const composeTransferHandler

  • composeTransferHandler<MiddlewareOptionsArr, Request, Response, CoreHandler>(coreHandler: CoreHandler, middleware: OptionToMiddleware<Request, Response, MiddlewareOptionsArr>): (Anonymous function)
  • Compose a transfer handler with a core transfer handler and a list of middleware.

    internal

    Type parameters

    • MiddlewareOptionsArr: any[]

    • Request: RequestBase

    • Response: ResponseBase

    • CoreHandler: TransferHandler<Request, Response, any>

    Parameters

    • coreHandler: CoreHandler

      Core transfer handler

    • middleware: OptionToMiddleware<Request, Response, MiddlewareOptionsArr>

      List of middleware

    Returns (Anonymous function)

    A transfer handler whose option type is the union of the core transfer handler's option type and the middleware's option type.

Const computeModPow

  • computeModPow(payload: object): Promise<string>

Const computeS

  • computeS(payload: object): Promise<string>

Const configureAutoTrack

  • Configures automatic event tracking for Pinpoint. This API will automatically transmit an analytic event when configured events are detected within your application. This can include: DOM element events (via the event tracker), session events (via the session tracker), and page view events (via the pageView tracker).

    remark

    Only session tracking is currently supported on React Native.

    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    Parameters

    Returns void

confirmResetPassword

confirmSignIn

confirmUserAttribute

Const connectionTimeout

  • connectionTimeout(error: any): boolean

constructKeyValue

constructTable

  • constructTable(table: Block, blockMap: object): Table

Const contentSha256Middleware

  • contentSha256Middleware(options: object): (Anonymous function)

Const convert

  • convert(stream: object): Promise<Uint8Array>
  • convert(stream: object): Promise<Uint8Array>

Const convertResponseHeaders

  • convertResponseHeaders(xhrHeaders: string): Record<string, string>

Const convertToTransferProgressEvent

Const copy

Const copyObjectDeserializer

Const copyObjectSerializer

countFilterCombinations

  • example

    returns 2

    { type: "or", predicates: [
    { field: "username", operator: "beginsWith", operand: "a" },
    { field: "title", operator: "contains", operand: "abc" },
    ]}

    Parameters

    Returns number

    the total number of OR'd predicates in the filter group

Const createAWSCredentialsAndIdentityIdProvider

  • createAWSCredentialsAndIdentityIdProvider(authConfig: AuthConfig, keyValueStorage: KeyValueStorageInterface): CredentialsAndIdentityIdProvider

Const createAmplifyServerContext

Const createAssertionFunction

createAttributes

createCancellableOperation

  • createCancellableOperation(handler: function, abortController: AbortController): Promise<HttpResponse>
  • createCancellableOperation(handler: function): Operation<HttpResponse>

Const createCancellableTask

  • createCancellableTask<Result>(__namedParameters: object): CancellableTask<Result>

Const createCookieStorageAdapterFromGetServerSidePropsContext

  • createCookieStorageAdapterFromGetServerSidePropsContext(request: NextServer.GetServerSidePropsContext["request"], response: NextServer.GetServerSidePropsContext["response"]): Adapter

Const createCookieStorageAdapterFromNextCookies

  • createCookieStorageAdapterFromNextCookies(cookies: NextServer.ServerComponentContext["cookies"]): Adapter

Const createCookieStorageAdapterFromNextRequestAndHttpResponse

  • createCookieStorageAdapterFromNextRequestAndHttpResponse(request: NextRequest, response: Response): Adapter

Const createCookieStorageAdapterFromNextRequestAndNextResponse

  • createCookieStorageAdapterFromNextRequestAndNextResponse(request: NextRequest, response: NextResponse): Adapter

Const createCookieStorageAdapterFromNextServerContext

  • createCookieStorageAdapterFromNextServerContext(context: Context): Adapter

createInMemoryStore

Const createKeyValueStorageFromCookieStorageAdapter

  • createKeyValueStorageFromCookieStorageAdapter(cookieStorageAdapter: Adapter): KeyValueStorageInterface

Const createKeysForAuthStorage

  • createKeysForAuthStorage(provider: string, identifier: string): object
  • createKeysForAuthStorage(provider: string, identifier: string): object
  • createKeysForAuthStorage(provider: string, identifier: string): object

Const createKinesisPutRecordsCommand

  • createKinesisPutRecordsCommand(streamName: string, events: KinesisBufferEvent[]): PutRecordsCommand

Const createMessageEventRecorder

Const createModelClass

  • createModelClass<T>(modelDefinition: SchemaModel): object

Const createMultipartUploadDeserializer

Const createMultipartUploadSerializer

Const createMutableCookieStoreFromHeaders

  • createMutableCookieStoreFromHeaders(headers: Headers): Pick<Adapter, "set" | "delete">

createMutationInstanceFromModelOperation

Const createNonModelClass

Const createPutEventsCommand

Const createPutRecordsBatchCommand

Const createRunWithAmplifyServerContext

Const createServerRunner

  • createServerRunner(__namedParameters: object): object
  • Creates the runWithAmplifyServerContext function to run Amplify server side APIs in an isolated request context.

    remarks

    This function should be called only once; you can use the returned runWithAmplifyServerContext across your codebase.

    example

    import { createServerRunner } from '@aws-amplify/adapter-nextjs'; import config from './amplifyconfiguration.json';

    export const { runWithAmplifyServerContext } = createServerRunner({ config })

    Parameters

    • __namedParameters: object
      • config: object | object

    Returns object

    An object that contains the runWithAmplifyServerContext function.

Const createServerRunnerForAPI

Const createStore

  • createStore(reducer: function): object

createToken

Const createTypeClasses

  • createTypeClasses(namespace: object & object): object

Const createUploadTask

  • createUploadTask<Result>(__namedParameters: object): UploadTask<Result>
  • Type parameters

    • Result

    Parameters

    • __namedParameters: object
      • isMultipartUpload: boolean
      • job: function
      • onCancel: function
          • (message?: string): void
          • Parameters

            • Optional message: string

            Returns void

      • onPause: function
          • (): void
          • Returns void

      • onResume: function
          • (): void
          • Returns void

    Returns UploadTask<Result>

Const createUserPoolsTokenProvider

cryptoSecureRandomInt

  • cryptoSecureRandomInt(): number

customSelectionSetToIR

  • customSelectionSetToIR(modelDefinitions: SchemaModels, modelName: string, selectionSet: string[]): Record<string, string | object>

debounce

  • debounce<F>(fun: F, delay: number): (Anonymous function)

decodeJWT

  • decodeJWT(token: string): JWT

Const deepFreeze

  • deepFreeze(object: any): any

deepMergeSelectionSetObjects

  • deepMergeSelectionSetObjects<T>(source: T, target: T): T
  • Recursively merges selection set objects from source onto target.

    target will be updated. source will be left alone.

    Type parameters

    Parameters

    • source: T

      The object to merge into target.

    • target: T

      The object to be mutated.

    Returns T

Const defaultAuthStrategy

  • defaultAuthStrategy(): any[]

defaultConflictHandler

defaultErrorHandler

defaultSelectionSetForModel

  • defaultSelectionSetForModel(modelDefinition: SchemaModel): string[]

Const defaultSelectionSetIR

  • defaultSelectionSetIR(relatedModelDefinition: SchemaModel): object

defaultState

Const del

deleteByIdStatement

deleteByPredicateStatement

Const deleteObjectDeserializer

Const deleteObjectSerializer

Const deserializeBoolean

  • deserializeBoolean(value?: string): boolean | undefined

Const deserializeChecksumAlgorithmList

  • deserializeChecksumAlgorithmList(output: any[]): string[]

Const deserializeCommonPrefix

  • deserializeCommonPrefix(output: any): object

Const deserializeCommonPrefixList

  • deserializeCommonPrefixList(output: any[]): object[]

Const deserializeCompletedPartList

Const deserializeCredentials

  • deserializeCredentials(__namedParameters?: object): Credentials

Const deserializeMetadata

Const deserializeNumber

  • deserializeNumber(value?: string): number | undefined

Const deserializeObject

  • deserializeObject(output: any): object

Const deserializeObjectList

  • deserializeObjectList(output: any[]): object[]

Const deserializeOwner

  • deserializeOwner(output: any): object

Const deserializeTimestamp

  • deserializeTimestamp(value: string): Date | undefined

Const destroyAmplifyServerContext

  • destroyAmplifyServerContext(contextSpec: ContextSpec): void

detect

Const detectFramework

dimToMake

  • dimToMake(dim: object): object

Const disableAnalytics

  • disableAnalytics(): void

Const disableCacheMiddleware

  • disableCacheMiddleware(): (Anonymous function)
  • disableCacheMiddleware(): (Anonymous function)
  • disableCacheMiddleware(): (Anonymous function)
  • A Cognito Identity-specific middleware that disables caching for all requests. A Cognito Identity-specific middleware that disables caching for all requests. A Cognito Identity-specific middleware that disables caching for all requests.

    Returns (Anonymous function)

  • A Cognito Identity-specific middleware that disables caching for all requests. A Cognito Identity-specific middleware that disables caching for all requests. A Cognito Identity-specific middleware that disables caching for all requests.

    Returns (Anonymous function)

  • A Cognito Identity-specific middleware that disables caching for all requests. A Cognito Identity-specific middleware that disables caching for all requests. A Cognito Identity-specific middleware that disables caching for all requests.

    Returns (Anonymous function)

Const dispatchApiEvent

dispatchEvent

  • Triggers an In-App message to be displayed. Use this after your campaigns have been synced to the device using syncMessages. Based on the messages synced and the event passed to this API, it triggers the display of the In-App message that meets the criteria.

    remark

    If an event would trigger multiple messages, the message closest to expiry will be chosen by default. To change this behavior, you can use the setConflictHandler API to provide your own logic for resolving message conflicts.

    throws

    validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.

    throws

    service exceptions - Thrown when the underlying Pinpoint service returns an error.

    example
    // Sync message before disptaching an event
    await syncMessages();
    
    // Dispatch an event
    await dispatchEvent({ name: 'test_event' });

    Parameters

    Returns Promise<void>

    A promise that will resolve when the operation is complete.

Const dispatchPubSubEvent

Const documentExists

  • documentExists(): boolean

Const downloadData

  • Download S3 object data to memory

    throws

    service: S3Exception - thrown when checking for existence of the object

    throws

    validation: - Validation errors

    example
    // Download a file from s3 bucket
    const { body, eTag } = await downloadData({ key, data: file, options: {
      onProgress, // Optional progress callback.
    } }).result;
    example
    // Cancel a task
    const downloadTask = downloadData({ key, data: file });
    //...
    downloadTask.cancel();
    try {
        await downloadTask.result;
    } catch (error) {
        if(isCancelError(error)) {
       // Handle error thrown by task cancelation.
        }
    }

    Parameters

    Returns DownloadDataOutput

    A cancelable task exposing result promise from result property.

Const downloadDataJob

  • downloadDataJob(__namedParameters: object, abortSignal: AbortSignal): (Anonymous function)

dynamicAuthFields

  • dynamicAuthFields(modelDefinition: SchemaModel): Set<string>

Const emitTrackingEvent

Const emptyArrayGuard

  • emptyArrayGuard<T>(value: any, deserializer: function): T

Const enableAnalytics

  • enableAnalytics(): void

Const endpointResolver

  • endpointResolver(__namedParameters: object): object
  • endpointResolver(__namedParameters: object): object
  • endpointResolver(__namedParameters: object): object
  • endpointResolver(__namedParameters: object): object
  • endpointResolver(options: S3EndpointResolverOptions, apiInput?: object): object
  • The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.

    Parameters

    • __namedParameters: object
      • region: string

    Returns object

  • The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.

    Parameters

    • __namedParameters: object
      • region: string

    Returns object

  • The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.

    Parameters

    • __namedParameters: object
      • region: string

    Returns object

  • The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.

    Parameters

    • __namedParameters: object
      • region: string

    Returns object

  • The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region. The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.

    Parameters

    Returns object

Const ensureEncodedForJSCookie

  • ensureEncodedForJSCookie(name: string): string

Const escapeUri

  • escapeUri(uri: string): string

Const establishRelationAndKeys

Const exhaustiveCheck

  • exhaustiveCheck(obj: never, throwOnError?: boolean): void

expoDetect

  • expoDetect(): boolean

Const extendedEncodeURIComponent

  • extendedEncodeURIComponent(uri: string): string

Const extractContent

  • extractContent(__namedParameters: object): InAppMessageContent[]

extractContentsFromBlock

  • extractContentsFromBlock(block: Block, blockMap: object): Content

Const extractKeyIfExists

Const extractMetadata

  • extractMetadata(__namedParameters: object): InAppMessage["metadata"]

Const extractPrimaryKeyFieldNames

  • extractPrimaryKeyFieldNames(modelDefinition: SchemaModel): string[]

Const extractPrimaryKeyValues

  • extractPrimaryKeyValues<T>(model: T, keyFields: string[]): string[]

Const extractPrimaryKeysAndValues

  • extractPrimaryKeysAndValues<T>(model: T, keyFields: string[]): any

Const extractTargetNamesFromSrc

  • Backwards-compatability for schema generated prior to custom primary key support: the single field targetName has been replaced with an array of targetNames. targetName and targetNames are exclusive (will never exist on the same schema)

    Parameters

    Returns string[] | undefined

    array of targetNames, or undefined

Const fetchAuthSession

fetchDevices

fetchInAppMessages

  • fetchInAppMessages(): Promise<InAppMessageCampaign[]>

fetchMFAPreference

Const fetchTransferHandler

  • fetchTransferHandler(__namedParameters: object, __namedParameters: object): Promise<object>
  • Parameters

    • __namedParameters: object
      • body: string | FormData | Blob | ReadableStream<any> | ArrayBufferView | ArrayBuffer | __type
      • headers: object
      • method: string
      • url: __type
    • __namedParameters: object
      • abortSignal: AbortSignal
      • cache: "no-store" | "default" | "force-cache" | "no-cache" | "only-if-cached" | "reload"
      • withCrossDomainCredentials: boolean

    Returns Promise<object>

Const fetchUserAttributes

filterFields

Const findCachedUploadParts

  • findCachedUploadParts(__namedParameters: object): Promise<object | null>
  • Find the cached multipart upload id and get the parts that have been uploaded with ListParts API. If the cached upload is expired(1 hour), return null.

    Parameters

    • __namedParameters: object
      • bucket: string
      • cacheKey: string
      • finalKey: string
      • s3Config: object
        • credentials: AWSCredentials
        • Optional customEndpoint?: string
        • Optional forcePathStyle?: boolean
        • region: string
        • Optional useAccelerateEndpoint?: boolean

    Returns Promise<object | null>

findIndexByFields

  • findIndexByFields<T>(needle: T, haystack: T[], keyFields: Array<keyof T>): number
  • Iterates through a collection to find a matching item and returns the index.

    Type parameters

    • T

    Parameters

    • needle: T

      The item to search for

    • haystack: T[]

      The collection to search

    • keyFields: Array<keyof T>

      The fields used to indicate a match

    Returns number

    Index of needle in haystack, otherwise -1 if not found.

Const flattenItems

  • flattenItems(obj: Record<string, any>): Record<string, any>

Const flushEvents

  • flushEvents(): void
  • flushEvents(): void
  • flushEvents(): void
  • flushEvents(): void
  • flushEvents(__namedParameters: object): void
  • Flushes all buffered Pinpoint events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Personalize events to the service.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    Returns void

  • Flushes all buffered Pinpoint events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Personalize events to the service.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    Returns void

  • Flushes all buffered Pinpoint events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Personalize events to the service.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    Returns void

  • Flushes all buffered Pinpoint events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Personalize events to the service.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    Returns void

  • Flushes all buffered Pinpoint events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Kinesis events to the service. Flushes all buffered Personalize events to the service.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    note

    This API will make a best-effort attempt to flush events from the buffer. Events recorded immediately after invoking this API may not be included in the flush.

    Parameters

    • __namedParameters: object
      • appId: string
      • bufferSize: number
      • credentials: object
        • accessKeyId: string
        • Optional expiration?: Date
        • secretAccessKey: string
        • Optional sessionToken?: string
      • flushInterval: number
      • flushSize: number
      • identityId: string
      • region: string
      • resendLimit: number
      • userAgentValue: string

    Returns void

formLoginsMap

  • formLoginsMap(idToken: string): object

generateCodeChallenge

  • generateCodeChallenge(codeVerifier: string): string

Const generateCodeVerifier

  • generateCodeVerifier(length: number): object
  • Parameters

    • length: number

      Desired length of the code verifier.

      NOTE: According to the RFC 7636 A code verifier must be with a length >= 43 and <= 128.

    Returns object

    An object that contains the generated codeVerifier and a method toCodeChallenge to generate the code challenge from the codeVerifier following the spec of RFC 7636.

    • method: "S256"
    • toCodeChallenge: function
        • (): string
        • Returns string

    • value: string

generateGraphQLDocument

generateIdentityId

generateModelsProperty

  • generateModelsProperty<T>(client: V6Client<Record<string, any>>, params: ClientGenerationParams): ModelTypes<T>

generateRTFRemediation

Const generateRandomBigInteger

Const generateRandomString

  • generateRandomString(length: number): string

generateSchemaStatements

generateSelectionSet

  • generateSelectionSet(modelDefinitions: SchemaModels, modelName: string, selectionSet?: string[]): string

generateServerClientUsingCookies

  • Generates an API client that can be used inside a Next.js Server Component with Dynamic Rendering

    example

    import { cookies } from "next/headers"

    const client = generateServerClientUsingCookies({ cookies }); const result = await client.graphql({ query: listPosts });

    Type parameters

    Parameters

    • __namedParameters: object
      • authMode: "apiKey" | "oidc" | "userPool" | "iam" | "lambda" | "none"
      • authToken: string
      • config: object | object
      • cookies: cookies

    Returns V6ClientSSRCookies<T>

generateServerClientUsingReqRes

  • Generates an API client that can be used with both Pages Router and App Router

    example

    import config from './amplifyconfiguration.json'; import { listPosts } from './graphql/queries';

    const client = generateServerClientUsingReqRes({ config });

    const result = await runWithAmplifyServerContext({ nextServerContext: { request, response }, operation: (contextSpec) => client.graphql(contextSpec, { query: listPosts, }), });

    Type parameters

    Parameters

    • __namedParameters: object
      • authMode: "apiKey" | "oidc" | "userPool" | "iam" | "lambda" | "none"
      • authToken: string
      • config: object | object

    Returns V6ClientSSRRequest<T>

Const generateState

  • generateState(): string

Const get

getActiveSignInUsername

  • getActiveSignInUsername(username: string): string

Const getAmplifyConfig

Const getAmplifyServerContext

Const getAmplifyUserAgent

Const getAmplifyUserAgentObject

  • getAmplifyUserAgentObject(__namedParameters?: object): AWSUserAgent

Const getAnalyticsEvent

Const getAnalyticsEventAttributes

getAnalyticsUserAgent

  • getAnalyticsUserAgent(action: AnalyticsAction): UserAgent

getAnalyticsUserAgentString

  • getAnalyticsUserAgentString(action: AnalyticsAction): string

Const getApnsAction

  • getApnsAction(action?: NativeAction): Pick<PushNotificationMessage, "deeplinkUrl"> | undefined

Const getApnsOptions

  • getApnsOptions(__namedParameters: object): Pick<PushNotificationMessage, "apnsOptions">

Const getAppStatePromise

  • getAppStatePromise(): Promise<null>

Const getAtob

  • getAtob(): atob
  • getAtob(): decode

Const getAttachment

getAuthRules

  • getAuthRules(__namedParameters: object): ("apiKey" | "oidc" | "userPool" | "iam" | "lambda" | "none")[]

getAuthStorageKeys

  • getAuthStorageKeys<T>(authKeys: T): (Anonymous function)

Const getAuthUserAgentDetails

Const getAuthUserAgentValue

Const getAuthenticationHelper

getAuthorizationRules

Const getBadgeCount

  • getBadgeCount(): Promise<never>
  • getBadgeCount(): Promise<number | void>
  • getBadgeCount(): void | Promise<number | null>
  • Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be ignored) even when your React Native app is running on platforms where badges are not supported.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    const badgeCount = await getBadgeCount();

    Returns Promise<never>

    A promise that resolves to a number representing the current count displayed on the app badge.

  • Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be ignored) even when your React Native app is running on platforms where badges are not supported.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    const badgeCount = await getBadgeCount();

    Returns Promise<number | void>

    A promise that resolves to a number representing the current count displayed on the app badge.

  • Returns the current badge count (the number next to your app's icon). This function is safe to call (but will be ignored) even when your React Native app is running on platforms where badges are not supported.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    const badgeCount = await getBadgeCount();

    Returns void | Promise<number | null>

    A promise that resolves to a number representing the current count displayed on the app badge.

getBoundingBox

  • getBoundingBox(geometry?: Geometry): BoundingBox | undefined

getBrowserType

  • getBrowserType(userAgent: string): object

Const getBtoa

  • getBtoa(): btoa
  • getBtoa(): encode

getByteLength

  • getByteLength(str: string): number

Const getBytesFromHex

  • getBytesFromHex(encoded: string): Uint8Array
  • getBytesFromHex(encoded: string): Uint8Array

Const getCache

  • getCache(key: string): Promise<any>

Const getCacheKey

Const getCanonicalHeaders

  • getCanonicalHeaders(headers: HttpRequest["headers"]): string
  • Returns canonical headers.

    internal

    Parameters

    • headers: HttpRequest["headers"]

      Headers from the request.

    Returns string

    Request headers that will be signed, and their values, separated by newline characters. Header names must use lowercase characters, must appear in alphabetical order, and must be followed by a colon (:). For the values, trim any leading or trailing spaces, convert sequential spaces to a single space, and separate the values for a multi-value header using commas.

Const getCanonicalQueryString

  • getCanonicalQueryString(searchParams: __type): string
  • Returns a canonical query string.

    internal

    Parameters

    • searchParams: __type

      searchParams from the request url.

    Returns string

    URL-encoded query string parameters, separated by ampersands (&). Percent-encode reserved characters, including the space character. Encode names and values separately. If there are empty parameters, append the equals sign to the parameter name before encoding. After encoding, sort the parameters alphabetically by key name. If there is no query string, use an empty string ("").

Const getCanonicalRequest

  • getCanonicalRequest(__namedParameters: object, uriEscapePath?: boolean): string
  • Returns a canonical request.

    internal

    Parameters

    • __namedParameters: object
      • body: string | FormData | Blob | ReadableStream<any> | ArrayBufferView | ArrayBuffer | __type
      • headers: object
      • method: string
      • url: __type
    • Default value uriEscapePath: boolean = true

      Whether to uri encode the path as part of canonical uri. It's used for S3 only where the pathname is already uri encoded, and the signing process is not expected to uri encode it again. Defaults to true.

    Returns string

    String created by by concatenating the following strings, separated by newline characters:

    • HTTPMethod
    • CanonicalUri
    • CanonicalQueryString
    • CanonicalHeaders
    • SignedHeaders
    • HashedPayload

Const getCanonicalUri

  • getCanonicalUri(pathname: string, uriEscapePath?: boolean): string
  • Returns a canonical uri.

    internal

    Parameters

    • pathname: string

      pathname from request url.

    • Default value uriEscapePath: boolean = true

      Whether to uri encode the path as part of canonical uri. It's used for S3 only where the pathname is already uri encoded, and the signing process is not expected to uri encode it again. Defaults to true.

    Returns string

    URI-encoded version of the absolute path component URL (everything between the host and the question mark character (?) that starts the query string parameters). If the absolute path is empty, a forward slash character (/).

Const getChannelType

Const getClientInfo

  • getClientInfo(): object | object
  • getClientInfo(): object
  • getClientInfo(): object

getClientSideAuthError

  • getClientSideAuthError(error: any): NO_API_KEY | NO_CURRENT_USER | NO_CREDENTIALS | NO_FEDERATED_JWT | NO_AUTH_TOKEN

Const getComparator

Const getConcurrentUploadsProgressTracker

  • getConcurrentUploadsProgressTracker(__namedParameters: object): object

getConfirmedAttributes

getConnectionFields

Const getConstants

  • getConstants(): object
  • Returns object

    • NativeEvent: object
      • Optional BACKGROUND_MESSAGE_RECEIVED?: string
      • FOREGROUND_MESSAGE_RECEIVED: string
      • LAUNCH_NOTIFICATION_OPENED: string
      • NOTIFICATION_OPENED: string
      • TOKEN_RECEIVED: string
    • Optional NativeHeadlessTaskKey?: string

Const getCredentialScope

  • getCredentialScope(date: string, region: string, service: string): string
  • Returns the credential scope which restricts the resulting signature to the specified region and service.

    internal

    Parameters

    • date: string

      Current date in the format 'YYYYMMDD'.

    • region: string

      AWS region in which the service resides.

    • service: string

      Service to which the signed request is being sent.

    Returns string

    A string representing the credential scope with format 'YYYYMMDD/region/service/aws4_request'.

Const getCredentialsForIdentityDeserializer

  • getCredentialsForIdentityDeserializer(response: HttpResponse): Promise<GetCredentialsForIdentityOutput>

Const getCredentialsForIdentitySerializer

Const getCrypto

  • getCrypto(): Crypto
  • getCrypto(): Crypto

Const getCurrentSizeKey

  • getCurrentSizeKey(keyPrefix: string): string

getCurrentTime

  • getCurrentTime(): number

Const getCurrentUser

getCustomHeaders

getCustomState

  • getCustomState(state: string): string

Const getCustomUserAgent

getDailyCount

Const getDataChunker

Const getDateHeader

  • getDateHeader(__namedParameters?: object): string | undefined

Const getDefaultAdapter

Const getDnsSuffix

  • getDnsSuffix(region: string): string
  • Get the AWS Services endpoint URL's DNS suffix for a given region. A typical AWS regional service endpoint URL will follow this pattern: {endpointPrefix}.{region}.{dnsSuffix}. For example, the endpoint URL for Cognito Identity in us-east-1 will be cognito-identity.us-east-1.amazonaws.com. Here the DnsSuffix is amazonaws.com.

    internal

    Parameters

    • region: string

    Returns string

    The DNS suffix

Const getEndpointId

Const getEventBuffer

getFactory

Const getFcmAction

  • getFcmAction(action?: NativeAction): Pick<PushNotificationMessage, "goToUrl" | "deeplinkUrl"> | undefined

Const getFcmOptions

  • getFcmOptions(__namedParameters: object): Pick<PushNotificationMessage, "fcmOptions">

getForbiddenError

  • getForbiddenError(error: any): any

Const getFormattedDates

getGeoUserAgent

  • getGeoUserAgent(action: GeoAction): UserAgent

getGeoUserAgentString

  • getGeoUserAgentString(action: GeoAction): string

Const getHashedData

Const getHashedDataAsHex

Const getHashedPayload

  • getHashedPayload(body: HttpRequest["body"]): string

Const getHexFromBytes

  • getHexFromBytes(bytes: Uint8Array): string

Const getHkdfKey

  • getHkdfKey(ikm: Uint8Array, salt: Uint8Array, info: Uint8Array): Uint8Array

Const getIdDeserializer

Const getIdSerializer

getIdentifierValue

getImplicitOwnerField

Const getInAppMessagesDeserializer

Const getInAppMessagesSerializer

getInAppMessagingUserAgent

  • getInAppMessagingUserAgent(action: InAppMessagingAction): UserAgent

getInAppMessagingUserAgentString

  • getInAppMessagingUserAgentString(action: InAppMessagingAction): string

Const getIndex

  • getIndex(rel: RelationType[], src: string): string | undefined

Const getIndexFromAssociation

  • getIndexFromAssociation(indexes: IndexesType, src: string | string[]): string | undefined

Const getIndexKeys

Const getLaunchNotification

  • getLaunchNotification(): Promise<never>
  • getLaunchNotification(): Promise<PushNotificationMessage>
  • getLaunchNotification(): Promise<PushNotificationMessage | null>
  • Returns the notification which launched your app from a terminated state. The launch notification is consumed by calls to this function and will yield a null result if:

    1. It is more than once (i.e. subsequent calls will be null)
    2. Another notification was opened while your app was running (either in foreground or background)
    3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)
    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    const launchNotification = await getLaunchNotification();

    Returns Promise<never>

  • Returns the notification which launched your app from a terminated state. The launch notification is consumed by calls to this function and will yield a null result if:

    1. It is more than once (i.e. subsequent calls will be null)
    2. Another notification was opened while your app was running (either in foreground or background)
    3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)
    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    const launchNotification = await getLaunchNotification();

    Returns Promise<PushNotificationMessage>

  • Returns the notification which launched your app from a terminated state. The launch notification is consumed by calls to this function and will yield a null result if:

    1. It is more than once (i.e. subsequent calls will be null)
    2. Another notification was opened while your app was running (either in foreground or background)
    3. Your app was brought back to the foreground by some other means (e.g. user tapped the app icon)
    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    const launchNotification = await getLaunchNotification();

    Returns Promise<PushNotificationMessage | null>

Const getLocalStorageWithFallback

  • getLocalStorageWithFallback(): Storage

getMFASettings

getMFAType

getMFATypes

  • getMFATypes(types?: string[]): AuthMFAType[] | undefined

getMessageCounts

getMetadataFields

  • getMetadataFields(): ReadonlyArray<string>

getModelAuthModes

  • getModelAuthModes(__namedParameters: object): Promise<object>

getModelConstructorByModelName

Const getModelDefinition

Const getMultipartUploadHandlers

  • getMultipartUploadHandlers(__namedParameters: object, size?: number): object
  • Create closure hiding the multipart upload implementation details and expose the upload job and control functions( onPause, onResume, onCancel).

    internal

    Parameters

    • __namedParameters: object
      • data: string | Blob | ArrayBufferView | ArrayBuffer
      • key: string
      • uploadDataOptions: object & object & object & object
    • Optional size: number

    Returns object

getMutationErrorType

getNamespace

getNewDeviceMetatada

  • This function is used to kick off the device management flow.

    If an error is thrown while generating a hash device or calling the ConfirmDevice client, then this API will ignore the error and return undefined. Otherwise the authentication flow will not complete and the user won't be able to be signed in.

    Parameters

    Returns Promise<DeviceMetadata | undefined>

    DeviceMetadata | undefined

getNonModelFields

getNow

  • getNow(): number

Const getNowString

  • getNowString(): string

Const getOAuthConfig

  • getOAuthConfig(__namedParameters: object): OAuthConfig

Const getObjectDeserializer

Const getObjectSerializer

Const getOperatingSystem

  • getOperatingSystem(): "android" | "ios" | "macos" | "windows" | "web"

Const getOptions

  • getOptions(request: object & Record<string, any>, accessInfo: object, serviceInfo: object, expiration?: number): object
  • Parameters

    • request: object & Record<string, any>
    • accessInfo: object
      • access_key: string
      • secret_key: string
      • session_token: string
    • serviceInfo: object
      • region: string
      • service: string
    • Optional expiration: number

    Returns object

    • credentials: object
      • accessKeyId: string
      • secretAccessKey: string
    • signingDate: Date
    • signingRegion: string
    • signingService: string

getOwnerFields

Const getPaddedHex

  • Returns an unambiguous, even-length hex string of the two's complement encoding of an integer.

    It is compatible with the hex encoding of Java's BigInteger's toByteArray(), wich returns a byte array containing the two's-complement representation of a BigInteger. The array contains the minimum number of bytes required to represent the BigInteger, including at least one sign bit.

    Examples showing how ambiguity is avoided by left padding with: "00" (for positive values where the most-significant-bit is set) "FF" (for negative values where the most-significant-bit is set)

    padHex(bigInteger.fromInt(-236)) === "FF14" padHex(bigInteger.fromInt(20)) === "14"

    padHex(bigInteger.fromInt(-200)) === "FF38" padHex(bigInteger.fromInt(56)) === "38"

    padHex(bigInteger.fromInt(-20)) === "EC" padHex(bigInteger.fromInt(236)) === "00EC"

    padHex(bigInteger.fromInt(-56)) === "C8" padHex(bigInteger.fromInt(200)) === "00C8"

    Parameters

    Returns string

    even-length hex string of the two's complement encoding.

Const getPermissionStatus

  • Returns a string representing the current status of user permissions to display push notifications. The possible statuses are as follows:

    • 'shouldRequest' - No permissions have been requested yet. It is idiomatic at this time to simply request for permissions from the user.

    • 'shouldExplainThenRequest' - It is recommended at this time to provide some context or rationale to the user explaining why you want to send them push notifications before requesting for permissions.

    • 'granted' - Permissions have been granted by the user. No further actions are needed and their app is ready to display notifications.

    • 'denied' - Permissions have been denied by the user. Further attempts to request permissions will no longer trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the permissions needed in their device settings.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    const permissionStatus = await getPermissionStatus();

    Returns Promise<never>

    a promise resolving to a string representing the current status of user selected notification permissions.

  • Returns a string representing the current status of user permissions to display push notifications. The possible statuses are as follows:

    • 'shouldRequest' - No permissions have been requested yet. It is idiomatic at this time to simply request for permissions from the user.

    • 'shouldExplainThenRequest' - It is recommended at this time to provide some context or rationale to the user explaining why you want to send them push notifications before requesting for permissions.

    • 'granted' - Permissions have been granted by the user. No further actions are needed and their app is ready to display notifications.

    • 'denied' - Permissions have been denied by the user. Further attempts to request permissions will no longer trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the permissions needed in their device settings.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    const permissionStatus = await getPermissionStatus();

    Returns Promise<"denied" | "granted" | "shouldRequest" | "shouldExplainThenRequest">

    a promise resolving to a string representing the current status of user selected notification permissions.

  • Returns a string representing the current status of user permissions to display push notifications. The possible statuses are as follows:

    • 'shouldRequest' - No permissions have been requested yet. It is idiomatic at this time to simply request for permissions from the user.

    • 'shouldExplainThenRequest' - It is recommended at this time to provide some context or rationale to the user explaining why you want to send them push notifications before requesting for permissions.

    • 'granted' - Permissions have been granted by the user. No further actions are needed and their app is ready to display notifications.

    • 'denied' - Permissions have been denied by the user. Further attempts to request permissions will no longer trigger a permission dialog. Your app should now either degrade gracefully or prompt your user to grant the permissions needed in their device settings.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    const permissionStatus = await getPermissionStatus();

    Returns Promise<PushNotificationPermissionStatus>

    a promise resolving to a string representing the current status of user selected notification permissions.

getPolygon

Const getPresignedGetObjectUrl

Const getProperties

getProviderFromRule

Const getPushNotificationUserAgentString

  • getPushNotificationUserAgentString(action: PushNotificationAction): string

Const getRandomBytes

  • getRandomBytes(nBytes: number): Uint8Array

Const getRandomString

  • getRandomString(): string

Const getRedirectPromise

  • getRedirectPromise(redirectUrls: string[]): Promise<string>

Const getRedirectUrl

  • getRedirectUrl(redirects: string[]): string
  • getRedirectUrl(redirectStr: string): string[]

getRegion

  • getRegion(userPoolId?: string): string

getRegionFromIdentityPoolId

  • getRegionFromIdentityPoolId(identityPoolId?: string): string

Const getRetryDecider

  • getRetryDecider(errorParser: ErrorParser): (Anonymous function)

getSQLiteType

  • getSQLiteType(scalar: keyof Omit<typeof GraphQLScalarType, "getJSType" | "getValidationFunction" | "getSQLiteType">): "TEXT" | "INTEGER" | "REAL" | "BLOB"

getScalarFields

getSessionCount

  • getSessionCount(messageId: string): number

Const getSessionStorageWithFallback

  • getSessionStorageWithFallback(): Storage

Const getSharedHeaders

  • getSharedHeaders(operation: string): Headers
  • getSharedHeaders(operation: string): Headers
  • getSharedHeaders(): Headers
  • getSharedHeaders(operation: string): Headers

getSignInDetailsFromTokens

getSignInResult

getSignInResultFromError

Const getSignature

  • getSignature(request: HttpRequest, __namedParameters: object): string

Const getSignatureString

  • getSignatureString(__namedParameters: object): string

Const getSignedHeaders

  • getSignedHeaders(headers: HttpRequest["headers"]): string

Const getSigningKey

  • getSigningKey(secretAccessKey: string, date: string, region: string, service: string): Uint8Array
  • Returns a signing key to be used for signing requests.

    internal

    Parameters

    • secretAccessKey: string

      AWS secret access key from credentials.

    • date: string

      Current date in the format 'YYYYMMDD'.

    • region: string

      AWS region in which the service resides.

    • service: string

      Service to which the signed request is being sent.

    Returns Uint8Array

    Uint8Array calculated from its composite parts.

Const getSigningValues

Const getSkewCorrectedDate

  • getSkewCorrectedDate(systemClockOffset: number): Date

Const getStartOfDay

  • getStartOfDay(): string
  • getStartOfDay(): string

getStateFromURL

  • getStateFromURL(urlParams: __type): string | null

getStorageUserAgentValue

  • getStorageUserAgentValue(action: StorageAction): string

Const getStorename

  • getStorename(namespace: string, modelName: string): string

Const getStringToSign

  • getStringToSign(date: string, credentialScope: string, hashedRequest: string): string
  • Returns a string to be signed.

    internal

    Parameters

    • date: string

      Current date in the format 'YYYYMMDDThhmmssZ'.

    • credentialScope: string

      String representing the credential scope with format 'YYYYMMDD/region/service/aws4_request'.

    • hashedRequest: string

      Hashed canonical request.

    Returns string

    A string created by by concatenating the following strings, separated by newline characters:

    • Algorithm
    • RequestDateTime
    • CredentialScope
    • HashedCanonicalRequest

getSubscriptionErrorType

getSyncErrorType

getTOTPSetupDetails

Const getTimestampFields

Const getToken

  • getToken(): string

getTokenForCustomAuth

getTotalCount

  • getTotalCount(messageId: string): Promise<number>

getTotalCountMap

getUnConfirmedAttributes

Const getUpdatedSystemClockOffset

  • getUpdatedSystemClockOffset(clockTimeInMilliseconds: number, currentSystemClockOffset: number): number

Const getUploadsCacheKey

  • getUploadsCacheKey(__namedParameters: object): string
  • Get the cache key of a multipart upload. Data source cached by different: size, content type, bucket, access level, key. If the data source is a File instance, the upload is additionally indexed by file name and last modified time. So the library always created a new multipart upload if the file is modified.

    Parameters

    • __namedParameters: object
      • accessLevel: "guest" | "protected" | "private"
      • bucket: string
      • contentType: string
      • file: File
      • key: string
      • size: number

    Returns string

Const getUrl

getUserContextData

  • getUserContextData(__namedParameters: object): object

getUserGroupsFromToken

Const getValueFromTextNode

  • getValueFromTextNode(obj: any): any

Const globalExists

  • globalExists(): boolean

Const globalThisExists

  • globalThisExists(): boolean

graphql

  • graphql<FALLBACK_TYPES, TYPED_GQL_STRING>(this: V6Client, options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>, additionalHeaders?: CustomHeaders): GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING>
  • Invokes graphql operations against a graphql service, providing correct input and output types if Amplify-generated graphql from a recent version of the CLI/codegen are used or correct typing is provided via the type argument.

    Amplify-generated "branded" graphql queries will look similar to this:

                                  //
                                  // |-- branding
                                  // v
    export const getModel = `...` as GeneratedQuery<
        GetModelQueryVariables,
        GetModelQuery
    >;

    If this branding is not in your generated graphql, update to a newer version of CLI/codegen and regenerate your graphql using amplify codegen.

    Using Amplify-generated graphql

    import * as queries from './graphql/queries';
    
    //
    //    |-- correctly typed graphql response containing a Widget
    //    v
    const queryResult = await graphql({
        query: queries.getWidget,
        variables: {
            id: "abc", // <-- type hinted/enforced
        },
    });
    
    //
    //    |-- a correctly typed Widget
    //    v
    const fetchedWidget = queryResult.data?.getWidget!;

    Custom input + result types

    To provide input types (variables) and result types:

    type GetById_NameOnly = {
        variables: {
            id: string
        },
        result: Promise<{
            data: { getWidget: { name: string } }
        }>
    }
    
    //
    //    |-- type is GetById_NameOnly["result"]
    //    v
    const result = graphql<GetById_NameOnly>({
        query: "...",
        variables: { id: "abc" }  // <-- type of GetById_NameOnly["variables"]
    });

    Custom result type only

    To specify result types only, use a type that is not in the {variables, result} shape:

    type MyResultType = Promise<{
        data: {
            getWidget: { name: string }
        }
    }>
    
    //
    //    |-- type is MyResultType
    //    v
    const result = graphql<MyResultType>({query: "..."});

    Type parameters

    • FALLBACK_TYPES

    • TYPED_GQL_STRING: string

    Parameters

    Returns GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING>

Const graphqlOperation

  • graphqlOperation(query: any, variables?: object, authToken?: string): object

Const groupBy

  • groupBy<T>(getGroupId: function, list: T[]): Record<string, T[]>

Const gzipDecompressToString

  • gzipDecompressToString(data: Uint8Array): Promise<string>
  • gzipDecompressToString(data: Uint8Array): Promise<string>

handleAuthResponse

  • handleAuthResponse(__namedParameters: object): Promise<void>

handleAutoSignInWithCodeOrUserConfirmed

  • handleAutoSignInWithCodeOrUserConfirmed(signInInput: SignInInput, resolve: Function, reject: Function): Promise<void>

handleAutoSignInWithLink

  • handleAutoSignInWithLink(signInInput: SignInInput, resolve: Function, reject: Function): void

handleChallengeName

handleCodeAutoSignIn

handleCodeFlow

  • handleCodeFlow(__namedParameters: object): Promise<void>

handleCompleteNewPasswordChallenge

  • Parameters

    • __namedParameters: object
      • challengeResponse: string
      • clientMetadata: object
        • [key: string]: string
      • config: object
        • Optional loginWith?: object
          • Optional email?: boolean
          • Optional oauth?: OAuthConfig
          • Optional phone?: boolean
          • Optional username?: boolean
        • Optional mfa?: object
          • Optional smsEnabled?: boolean
          • Optional status?: "on" | "off" | "optional"
          • Optional totpEnabled?: boolean
        • Optional passwordFormat?: object
          • Optional minLength?: number
          • Optional requireLowercase?: boolean
          • Optional requireNumbers?: boolean
          • Optional requireSpecialCharacters?: boolean
          • Optional requireUppercase?: boolean
        • Optional signUpVerificationMethod?: "code" | "link"
        • Optional userAttributes?: AuthConfigUserAttributes
        • userPoolClientId: string
        • Optional userPoolEndpoint?: string
        • userPoolId: string
      • requiredAttributes: object
      • session: string
      • username: string

    Returns Promise<RespondToAuthChallengeCommandOutput>

handleCustomAuthFlowWithoutSRP

handleCustomChallenge

  • Parameters

    • __namedParameters: object
      • challengeResponse: string
      • clientMetadata: object
        • [key: string]: string
      • config: object
        • Optional loginWith?: object
          • Optional email?: boolean
          • Optional oauth?: OAuthConfig
          • Optional phone?: boolean
          • Optional username?: boolean
        • Optional mfa?: object
          • Optional smsEnabled?: boolean
          • Optional status?: "on" | "off" | "optional"
          • Optional totpEnabled?: boolean
        • Optional passwordFormat?: object
          • Optional minLength?: number
          • Optional requireLowercase?: boolean
          • Optional requireNumbers?: boolean
          • Optional requireSpecialCharacters?: boolean
          • Optional requireUppercase?: boolean
        • Optional signUpVerificationMethod?: "code" | "link"
        • Optional userAttributes?: AuthConfigUserAttributes
        • userPoolClientId: string
        • Optional userPoolEndpoint?: string
        • userPoolId: string
      • session: string
      • tokenOrchestrator: AuthTokenOrchestrator
      • username: string

    Returns Promise<RespondToAuthChallengeCommandOutput>

handleCustomSRPAuthFlow

handleDevicePasswordVerifier

handleDeviceSRPAuth

  • Parameters

    • __namedParameters: object
      • clientMetadata: object
        • [key: string]: string
      • config: object
        • Optional loginWith?: object
          • Optional email?: boolean
          • Optional oauth?: OAuthConfig
          • Optional phone?: boolean
          • Optional username?: boolean
        • Optional mfa?: object
          • Optional smsEnabled?: boolean
          • Optional status?: "on" | "off" | "optional"
          • Optional totpEnabled?: boolean
        • Optional passwordFormat?: object
          • Optional minLength?: number
          • Optional requireLowercase?: boolean
          • Optional requireNumbers?: boolean
          • Optional requireSpecialCharacters?: boolean
          • Optional requireUppercase?: boolean
        • Optional signUpVerificationMethod?: "code" | "link"
        • Optional userAttributes?: AuthConfigUserAttributes
        • userPoolClientId: string
        • Optional userPoolEndpoint?: string
        • userPoolId: string
      • session: string
      • tokenOrchestrator: AuthTokenOrchestrator
      • username: string

    Returns Promise<RespondToAuthChallengeCommandOutput>

Const handleEmptyResponseDeserializer

  • handleEmptyResponseDeserializer<Output>(): function

handleFailure

  • handleFailure(errorMessage: string | null): Promise<void>

handleImplicitFlow

  • handleImplicitFlow(__namedParameters: object): Promise<void>

handleMFASetupChallenge

  • Parameters

    • __namedParameters: object
      • challengeResponse: string
      • clientMetadata: object
        • [key: string]: string
      • config: object
        • Optional loginWith?: object
          • Optional email?: boolean
          • Optional oauth?: OAuthConfig
          • Optional phone?: boolean
          • Optional username?: boolean
        • Optional mfa?: object
          • Optional smsEnabled?: boolean
          • Optional status?: "on" | "off" | "optional"
          • Optional totpEnabled?: boolean
        • Optional passwordFormat?: object
          • Optional minLength?: number
          • Optional requireLowercase?: boolean
          • Optional requireNumbers?: boolean
          • Optional requireSpecialCharacters?: boolean
          • Optional requireUppercase?: boolean
        • Optional signUpVerificationMethod?: "code" | "link"
        • Optional userAttributes?: AuthConfigUserAttributes
        • userPoolClientId: string
        • Optional userPoolEndpoint?: string
        • userPoolId: string
      • deviceName: string
      • session: string
      • username: string

    Returns Promise<RespondToAuthChallengeCommandOutput>

Const handleOAuthSignOut

handlePasswordVerifierChallenge

handleSMSMFAChallenge

  • Parameters

    • __namedParameters: object
      • challengeResponse: string
      • clientMetadata: object
        • [key: string]: string
      • config: object
        • Optional loginWith?: object
          • Optional email?: boolean
          • Optional oauth?: OAuthConfig
          • Optional phone?: boolean
          • Optional username?: boolean
        • Optional mfa?: object
          • Optional smsEnabled?: boolean
          • Optional status?: "on" | "off" | "optional"
          • Optional totpEnabled?: boolean
        • Optional passwordFormat?: object
          • Optional minLength?: number
          • Optional requireLowercase?: boolean
          • Optional requireNumbers?: boolean
          • Optional requireSpecialCharacters?: boolean
          • Optional requireUppercase?: boolean
        • Optional signUpVerificationMethod?: "code" | "link"
        • Optional userAttributes?: AuthConfigUserAttributes
        • userPoolClientId: string
        • Optional userPoolEndpoint?: string
        • userPoolId: string
      • session: string
      • username: string

    Returns Promise<RespondToAuthChallengeCommandOutput>

handleSelectMFATypeChallenge

  • Parameters

    • __namedParameters: object
      • challengeResponse: string
      • clientMetadata: object
        • [key: string]: string
      • config: object
        • Optional loginWith?: object
          • Optional email?: boolean
          • Optional oauth?: OAuthConfig
          • Optional phone?: boolean
          • Optional username?: boolean
        • Optional mfa?: object
          • Optional smsEnabled?: boolean
          • Optional status?: "on" | "off" | "optional"
          • Optional totpEnabled?: boolean
        • Optional passwordFormat?: object
          • Optional minLength?: number
          • Optional requireLowercase?: boolean
          • Optional requireNumbers?: boolean
          • Optional requireSpecialCharacters?: boolean
          • Optional requireUppercase?: boolean
        • Optional signUpVerificationMethod?: "code" | "link"
        • Optional userAttributes?: AuthConfigUserAttributes
        • userPoolClientId: string
        • Optional userPoolEndpoint?: string
        • userPoolId: string
      • session: string
      • username: string

    Returns Promise<RespondToAuthChallengeCommandOutput>

handleSoftwareTokenMFAChallenge

  • Parameters

    • __namedParameters: object
      • challengeResponse: string
      • clientMetadata: object
        • [key: string]: string
      • config: object
        • Optional loginWith?: object
          • Optional email?: boolean
          • Optional oauth?: OAuthConfig
          • Optional phone?: boolean
          • Optional username?: boolean
        • Optional mfa?: object
          • Optional smsEnabled?: boolean
          • Optional status?: "on" | "off" | "optional"
          • Optional totpEnabled?: boolean
        • Optional passwordFormat?: object
          • Optional minLength?: number
          • Optional requireLowercase?: boolean
          • Optional requireNumbers?: boolean
          • Optional requireSpecialCharacters?: boolean
          • Optional requireUppercase?: boolean
        • Optional signUpVerificationMethod?: "code" | "link"
        • Optional userAttributes?: AuthConfigUserAttributes
        • userPoolClientId: string
        • Optional userPoolEndpoint?: string
        • userPoolId: string
      • session: string
      • username: string

    Returns Promise<RespondToAuthChallengeCommandOutput>

handleUserPasswordAuthFlow

handleUserSRPAuthFlow

Const hasOnlyNamespaceAttributes

  • hasOnlyNamespaceAttributes(node: Element): boolean

Const head

Const headObjectDeserializer

Const headObjectSerializer

Const helper

  • helper(buffer: ArrayBuffer | Blob, byteOffset: number, byteLength: number, partSize: number): Generator<PartToUpload, void, undefined>

Const hexEncode

  • hexEncode(c: string): string
  • hexEncode(c: string): string

hexStringify

Const iamAuthApplicable

  • iamAuthApplicable(__namedParameters: object, signingServiceInfo?: SigningServiceInfo): boolean

Const identifyUser

  • identifyUser(__namedParameters: object): Promise<void>
  • identifyUser(__namedParameters: object): Promise<void>
  • identifyUser(): Promise<never>
  • identifyUser(__namedParameters: object): Promise<void>
  • Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId. Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId. Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId.

    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint with some additional demographics
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        }
    });
    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint specific options
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        },
        options: {
            address: 'device-address',
            optOut: 'NONE',
            userAttributes: {
                interests: ['food']
            },
        },
    });
    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: PushNotificationValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint specific options
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        },
        options: {
            address: 'device-address',
            optOut: 'NONE',
            userAttributes: {
                interests: ['food']
            },
        },
    });

    Parameters

    • __namedParameters: object
      • options: object
      • userId: string
      • userProfile: object
        • Optional customProperties?: Record<string, string[]>
        • Optional demographic?: object
          • Optional appVersion?: string
          • Optional locale?: string
          • Optional make?: string
          • Optional model?: string
          • Optional modelVersion?: string
          • Optional platform?: string
          • Optional platformVersion?: string
          • Optional timezone?: string
        • Optional email?: string
        • Optional location?: object
          • Optional city?: string
          • Optional country?: string
          • Optional latitude?: number
          • Optional longitude?: number
          • Optional postalCode?: string
          • Optional region?: string
        • Optional metrics?: Record<string, number>
        • Optional name?: string
        • Optional plan?: string

    Returns Promise<void>

    A promise that will resolve when the operation is complete.

  • Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId. Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId. Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId.

    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint with some additional demographics
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        }
    });
    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint specific options
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        },
        options: {
            address: 'device-address',
            optOut: 'NONE',
            userAttributes: {
                interests: ['food']
            },
        },
    });
    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: PushNotificationValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint specific options
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        },
        options: {
            address: 'device-address',
            optOut: 'NONE',
            userAttributes: {
                interests: ['food']
            },
        },
    });

    Parameters

    • __namedParameters: object
      • options: object
        • Optional address?: string
        • Optional optOut?: "ALL" | "NONE"
        • Optional userAttributes?: Record<string, string[]>
      • userId: string
      • userProfile: object
        • Optional customProperties?: Record<string, string[]>
        • Optional demographic?: object
          • Optional appVersion?: string
          • Optional locale?: string
          • Optional make?: string
          • Optional model?: string
          • Optional modelVersion?: string
          • Optional platform?: string
          • Optional platformVersion?: string
          • Optional timezone?: string
        • Optional email?: string
        • Optional location?: object
          • Optional city?: string
          • Optional country?: string
          • Optional latitude?: number
          • Optional longitude?: number
          • Optional postalCode?: string
          • Optional region?: string
        • Optional metrics?: Record<string, number>
        • Optional name?: string
        • Optional plan?: string

    Returns Promise<void>

    A promise that will resolve when the operation is complete.

  • Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId. Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId. Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId.

    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint with some additional demographics
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        }
    });
    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint specific options
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        },
        options: {
            address: 'device-address',
            optOut: 'NONE',
            userAttributes: {
                interests: ['food']
            },
        },
    });
    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: PushNotificationValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint specific options
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        },
        options: {
            address: 'device-address',
            optOut: 'NONE',
            userAttributes: {
                interests: ['food']
            },
        },
    });

    Returns Promise<never>

    A promise that will resolve when the operation is complete.

  • Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId. Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId. Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user profile and activities or actions in your application. Activity can be tracked across devices & platforms by using the same userId.

    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint with some additional demographics
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        }
    });
    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint specific options
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        },
        options: {
            address: 'device-address',
            optOut: 'NONE',
            userAttributes: {
                interests: ['food']
            },
        },
    });
    throws

    service: UpdateEndpointException - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: PushNotificationValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    // Identify a user with Pinpoint
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
        }
    });
    example
    // Identify a user with Pinpoint specific options
    await identifyUser({
        userId,
        userProfile: {
            email: 'userEmail@example.com'
            customProperties: {
                phoneNumber: ['555-555-5555'],
            },
            demographic: {
                platform: 'ios',
                timezone: 'America/Los_Angeles'
            }
        },
        options: {
            address: 'device-address',
            optOut: 'NONE',
            userAttributes: {
                interests: ['food']
            },
        },
    });

    Parameters

    • __namedParameters: object
      • options: object
        • Optional address?: string
        • Optional optOut?: "ALL" | "NONE"
        • Optional userAttributes?: Record<string, string[]>
      • userId: string
      • userProfile: object
        • Optional customProperties?: Record<string, string[]>
        • Optional demographic?: object
          • Optional appVersion?: string
          • Optional locale?: string
          • Optional make?: string
          • Optional model?: string
          • Optional modelVersion?: string
          • Optional platform?: string
          • Optional platformVersion?: string
          • Optional timezone?: string
        • Optional email?: string
        • Optional location?: object
          • Optional city?: string
          • Optional country?: string
          • Optional latitude?: number
          • Optional longitude?: number
          • Optional postalCode?: string
          • Optional region?: string
        • Optional metrics?: Record<string, number>
        • Optional name?: string
        • Optional plan?: string

    Returns Promise<void>

    A promise that will resolve when the operation is complete.

Const implicitAuthFieldsForModel

  • implicitAuthFieldsForModel(model: SchemaModel): string[]

inMemoryPagination

  • inMemoryPagination<T>(records: T[], pagination?: PaginationInput<T>): T[]
  • Statelessly extracts the specified page from an array.

    Type parameters

    Parameters

    • records: T[]

      The source array to extract a page from.

    • Optional pagination: PaginationInput<T>

      A definition of the page to extract.

    Returns T[]

    This items from records matching the pagination definition.

incrementMessageCounts

  • incrementMessageCounts(messageId: string): Promise<void>

Const indexNameFromKeys

  • indexNameFromKeys(keys: string[]): string

Const initSchema

  • initSchema(userSchema: Schema): object

Const initialAutoSignIn

Const initialize

  • initialize(): void
  • initialize(): Promise<void>

initializeInAppMessaging

  • initializeInAppMessaging(): void

Const initializeInstance

initializeModel

Const initializePushNotifications

  • initializePushNotifications(): never
  • initializePushNotifications(): void

int2char

  • int2char(n: number): string

intAt

  • intAt(s: string, i: number): number

Const internals

  • Takes a key object from registerPredicateInternals() to fetch an internal GroupCondition object, which can then be used to query storage or test/match objects.

    This indirection exists to hide GroupCondition from public interfaces, since GroupCondition contains extra methods and properties that public callers should not use.

    Parameters

    • key: any

      A key object previously returned by registerPredicateInternals()

    Returns GroupCondition

Const interpretLayout

  • interpretLayout(layout: NonNullable<PinpointInAppMessage["InAppMessage"]>["Layout"]): InAppMessageLayout

Const invokeAndClearPromise

  • invokeAndClearPromise(): void

Const isAWSDate

  • isAWSDate(val: string): boolean

Const isAWSDateTime

  • isAWSDateTime(val: string): boolean

Const isAWSEmail

  • isAWSEmail(val: string): boolean

Const isAWSIPAddress

  • isAWSIPAddress(val: string): boolean

Const isAWSJSON

  • isAWSJSON(val: string): boolean

Const isAWSPhone

  • isAWSPhone(val: string): boolean

Const isAWSTime

  • isAWSTime(val: string): boolean

Const isAWSTimestamp

  • isAWSTimestamp(val: number): boolean

Const isAWSURL

  • isAWSURL(val: string): boolean

Const isActive

  • isActive(appState?: string): boolean

Const isAmplifyInstance

  • isAmplifyInstance(amplify: AmplifyClassV6 | function): amplify

Const isAnalyticsEnabled

  • isAnalyticsEnabled(): boolean

Const isApnsMessage

Const isAppInForeground

  • isAppInForeground(): boolean
  • isAppInForeground(): boolean

Const isArrayBuffer

  • isArrayBuffer(arg: any): arg

isAssociatedWith

  • isAssociatedWith(obj: any): obj

isAuthAttribute

  • isAuthAttribute(attribute: any): attribute
  • Type guard that identifies an auth attribute with an attached rules list that specifies an allow attribute at a minimum.

    Parameters

    • attribute: any

      Any object. Ideally a model introspection schema model attribute

    Returns attribute

    True if given object is an auth attribute

isAutoSignInStarted

  • isAutoSignInStarted(): boolean

isAutoSignInUserUsingConfirmSignUp

  • isAutoSignInUserUsingConfirmSignUp(username: string): boolean

Const isBeforeEndDate

  • isBeforeEndDate(__namedParameters: object): boolean

isBelowCap

  • isBelowCap(__namedParameters: object): Promise<Boolean>

Const isBrowser

  • isBrowser(): boolean

Const isCancelError

  • isCancelError(this: V6Client, error: any): boolean
  • isCancelError(error: unknown): error
  • isCancelError(error: unknown): error

Const isClockSkewError

  • isClockSkewError(errorCode?: string): boolean
  • Given an error code, returns true if it is related to a clock skew error.

    internal

    Parameters

    • Optional errorCode: string

      String representation of some error.

    Returns boolean

    True if given error is present in CLOCK_SKEW_ERROR_CODES, false otherwise.

Const isClockSkewed

  • isClockSkewed(clockTimeInMilliseconds: number, clockOffsetInMilliseconds: number): boolean
  • Checks if the provided date is within the skew window of 5 minutes.

    internal

    Parameters

    • clockTimeInMilliseconds: number

      Time to check for skew in milliseconds.

    • clockOffsetInMilliseconds: number

      Offset to check clock against in milliseconds.

    Returns boolean

    True if skewed. False otherwise.

Const isComparison

  • isComparison(o: any): boolean
  • Determines whether an object is a GraphQL style predicate comparison node, which must be an object containing a single "comparison operator" key, which then contains the operand or operands to compare against.

    Parameters

    • o: any

      The object to test.

    Returns boolean

Const isConnectionError

  • isConnectionError(error?: unknown): boolean

isConvertBytesSource

  • isConvertBytesSource(obj: any): obj

isCustomState

  • isCustomState(state: string): Boolean

Const isDnsCompatibleBucketName

  • isDnsCompatibleBucketName(bucketName: string): boolean

Const isDocumentNode

  • isDocumentNode(node: Node): node

Const isElementNode

  • isElementNode(node: Node): node

Const isEmpty

  • isEmpty(o: any): boolean
  • Determines whether an object specifies no conditions and should match everything, as would be the case with Predicates.ALL.

    Parameters

    • o: any

      The object to test.

    Returns boolean

isEnumFieldType

  • isEnumFieldType(obj: any): obj

Const isFcmMessage

isFieldAssociation

  • isFieldAssociation(obj: any, fieldName: string): obj

isFileSource

  • isFileSource(obj: any): obj

isGraphQLScalarType

  • isGraphQLScalarType(obj: any): obj

Const isGroup

  • isGroup(o: any): boolean
  • Determines whether an object is a GraphQL style predicate "group", which must be an object containing a single "group key", which then contains the child condition(s).

    E.g.,

    { and: [ ... ] }
    { not: { ... } }

    Parameters

    • o: any

      The object to test.

    Returns boolean

Const isHttp

  • isHttp(redirect: string): boolean

Const isHttps

  • isHttps(redirect: string): boolean

Const isIdManaged

Const isIdOptionallyManaged

  • isIdOptionallyManaged(modelDefinition: SchemaModel): boolean

isIdentifierObject

  • isIdentifierObject<T>(obj: any, modelDefinition: SchemaModel): obj

isIdentifyBytesSource

  • isIdentifyBytesSource(obj: any): obj

isIdentifyCelebrities

  • isIdentifyCelebrities(obj: any): obj

isIdentifyEntitiesInput

  • isIdentifyEntitiesInput(obj: any): obj

isIdentifyFromCollection

  • isIdentifyFromCollection(obj: any): obj

isIdentifyLabelsInput

  • isIdentifyLabelsInput(obj: any): obj

isIdentifyTextInput

  • isIdentifyTextInput(obj: any): obj

Const isInactive

  • isInactive(appState?: string): boolean

Const isInitialized

  • isInitialized(): boolean
  • isInitialized(): boolean

isInteger

  • isInteger(value?: number): boolean

isInterpretTextInput

  • isInterpretTextInput(obj: any): obj

isInterpretTextOthers

  • isInterpretTextOthers(text: InterpretTextInput["text"]): text

isMFATypeEnabled

Const isMetadataBearer

  • isMetadataBearer(response: unknown): response

isModelAttributeAuth

isModelAttributeCompositeKey

isModelAttributeKey

isModelAttributePrimaryKey

Const isModelConstructor

  • isModelConstructor<T>(obj: any): obj

isModelFieldType

  • isModelFieldType<T>(obj: any): obj

Const isNamespaceAttributeName

  • isNamespaceAttributeName(name: string): boolean

Const isNonModelConstructor

  • isNonModelConstructor(obj: any): obj

isNonModelFieldType

  • isNonModelFieldType(obj: any): obj

Const isNonRetryableError

  • isNonRetryableError(obj: any): obj

Const isNullOrUndefined

  • isNullOrUndefined(val: any): boolean

isPredicateGroup

  • isPredicateGroup<T>(obj: any): obj

isPredicateObj

  • isPredicateObj<T>(obj: any): obj

isPredicatesAll

  • isPredicatesAll(predicate: any): predicate

Const isPrivateMode

  • isPrivateMode(): Promise<unknown>

isQueryOne

  • isQueryOne(obj: any): obj

Const isQuietTime

  • isQuietTime(message: PinpointInAppMessage): boolean

Const isSafariCompatabilityMode

  • isSafariCompatabilityMode(): Promise<any>
  • Whether the browser's implementation of IndexedDB breaks on array lookups against composite indexes whose keypath contains a single column.

    E.g., Whether store.createIndex(indexName, ['id']) followed by store.index(indexName).get([1]) will ever return records.

    In all known, modern Safari browsers as of Q4 2022, the query against an index like this will always return undefined. So, the index needs to be created as a scalar.

    Returns Promise<any>

Const isSameOriginAndPathName

  • isSameOriginAndPathName(redirect: string): boolean

isSchemaModel

  • isSchemaModel(obj: any): obj

isSchemaModelWithAttributes

Const isServerSideError

  • isServerSideError(statusCode?: number, errorCode?: string): boolean

Const isSessionRevocable

  • isSessionRevocable(token: JWT): boolean

isSignUpComplete

Const isSourceData

  • isSourceData(body: HttpRequest["body"]): body

isSpeechToTextInput

  • isSpeechToTextInput(obj: any): obj

isStorageSource

  • isStorageSource(obj: any): obj

isTargetNameAssociation

  • isTargetNameAssociation(obj: any): obj

Const isTextOnlyElementNode

  • isTextOnlyElementNode(node: Element): boolean

isTextToSpeechInput

  • isTextToSpeechInput(obj: any): obj

Const isTheSameDomain

  • isTheSameDomain(redirect: string): boolean

Const isThrottlingError

  • isThrottlingError(statusCode?: number, errorCode?: string): boolean

isTokenExpired

  • isTokenExpired(__namedParameters: object): boolean

isTranslateTextInput

  • isTranslateTextInput(obj: any): obj

isTypeUserPoolConfig

  • isTypeUserPoolConfig(authConfig?: AuthConfig): authConfig

isUnauthError

  • isUnauthError(error: any): boolean

Const isValid

  • isValid(o: any): any

isValidConvertInput

  • isValidConvertInput(obj: any): boolean

isValidIdentifyInput

  • isValidIdentifyInput(obj: any): boolean

isValidInterpretInput

  • isValidInterpretInput(obj: any): boolean

Const isValidModelConstructor

  • isValidModelConstructor<T>(obj: any): obj

Const isWebWorker

  • isWebWorker(): boolean

Const keyPrefixMatch

  • keyPrefixMatch(object: object, prefix: string): boolean

Const keysEqual

  • keysEqual(keysA: any, keysB: any): boolean

Const keysFromModel

  • keysFromModel(model: any): string

limitClauseFromPagination

Const list

Const listCachedUploadTasks

listFactory

Const listObjectsV2Deserializer

Const listObjectsV2Serializer

Const listPartsDeserializer

Const listPartsSerializer

Const loadAmplifyPushNotification

  • loadAmplifyPushNotification(): object
  • Returns object

    • addMessageEventListener: function
        • (event: string, listener: function): EmitterSubscription
        • Parameters

          • event: string
          • listener: function
              • (message: PushNotificationMessage | null, completionHandlerId?: string | undefined): void
              • Parameters

                • message: PushNotificationMessage | null
                • Optional completionHandlerId: string | undefined

                Returns void

          Returns EmitterSubscription

    • addTokenEventListener: function
        • (event: string, listener: function): EmitterSubscription
        • Parameters

          • event: string
          • listener: function
              • (token: string): void
              • Parameters

                • token: string

                Returns void

          Returns EmitterSubscription

    • completeNotification: function
        • (completionHandlerId: string): void
        • Parameters

          • completionHandlerId: string

          Returns void

    • getBadgeCount: function
        • (): void | Promise<number | null>
        • Returns void | Promise<number | null>

    • getConstants: function
        • (): object
        • Returns object

          • NativeEvent: object
            • Optional BACKGROUND_MESSAGE_RECEIVED?: string | undefined
            • FOREGROUND_MESSAGE_RECEIVED: string
            • LAUNCH_NOTIFICATION_OPENED: string
            • NOTIFICATION_OPENED: string
            • TOKEN_RECEIVED: string
          • Optional NativeHeadlessTaskKey?: string | undefined
    • getLaunchNotification: function
        • (): Promise<PushNotificationMessage | null>
        • Returns Promise<PushNotificationMessage | null>

    • getPermissionStatus: function
        • (): Promise<"denied" | "granted" | "shouldRequest" | "shouldExplainThenRequest">
        • Returns Promise<"denied" | "granted" | "shouldRequest" | "shouldExplainThenRequest">

    • registerHeadlessTask: function
        • (task: function): void
        • Parameters

          • task: function
              • (message: PushNotificationMessage | null): Promise<void>
              • Parameters

                • message: PushNotificationMessage | null

                Returns Promise<void>

          Returns void

    • requestPermissions: function
        • (__namedParameters?: object): Promise<boolean>
        • Parameters

          • Optional __namedParameters: object
            • alert: boolean
            • badge: boolean
            • sound: boolean

          Returns Promise<boolean>

    • setBadgeCount: function
        • (count: number): void
        • Parameters

          • count: number

          Returns void

Const loadAmplifyWebBrowser

  • loadAmplifyWebBrowser(): object

Const loadAppState

  • loadAppState(): AppStateStatic

Const loadAsyncStorage

  • loadAsyncStorage(): AsyncStorageStatic

Const loadBase64

  • loadBase64(): object

Const loadBuffer

  • loadBuffer(): object
  • Returns object

    • constructor: function
      • new __type(str: string, encoding?: string): __type
      • new __type(size: number): __type
      • new __type(array: Uint8Array): __type
      • new __type(arrayBuffer: ArrayBuffer): __type
      • new __type(array: ReadonlyArray<any>): __type
      • new __type(buffer: __type): __type
      • Allocates a new buffer containing the given {str}.

        Parameters

        • str: string

          String to store in buffer.

        • Optional encoding: string

          encoding to use, optional. Default is 'utf8'

        Returns __type

      • Allocates a new buffer of {size} octets.

        Parameters

        • size: number

          count of octets to allocate.

        Returns __type

      • Allocates a new buffer containing the given {array} of octets.

        Parameters

        • array: Uint8Array

          The octets to store.

        Returns __type

      • Produces a Buffer backed by the same allocated memory as the given {ArrayBuffer}.

        Parameters

        • arrayBuffer: ArrayBuffer

          The ArrayBuffer with which to share memory.

        Returns __type

      • Allocates a new buffer containing the given {array} of octets.

        Parameters

        • array: ReadonlyArray<any>

          The octets to store.

        Returns __type

      • Copies the passed {buffer} data onto a new {Buffer} instance.

        Parameters

        • buffer: __type

          The buffer to copy.

        Returns __type

    • poolSize: number

      This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.

    • prototype: __type
    • alloc: function
      • alloc(size: number, fill?: string | __type | number, encoding?: string): __type
      • Allocates a new buffer of {size} octets.

        Parameters

        • size: number

          count of octets to allocate.

        • Optional fill: string | __type | number

          if specified, buffer will be initialized by calling buf.fill(fill). If parameter is omitted, buffer will be filled with zeros.

        • Optional encoding: string

          encoding used for call to buf.fill while initalizing

        Returns __type

    • allocUnsafe: function
      • allocUnsafe(size: number): __type
      • Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents of the newly created Buffer are unknown and may contain sensitive data.

        Parameters

        • size: number

          count of octets to allocate

        Returns __type

    • allocUnsafeSlow: function
      • allocUnsafeSlow(size: number): __type
      • Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents of the newly created Buffer are unknown and may contain sensitive data.

        Parameters

        • size: number

          count of octets to allocate

        Returns __type

    • byteLength: function
      • byteLength(string: string | __type | DataView | ArrayBuffer, encoding?: string): number
      • Gives the actual byte length of a string. encoding defaults to 'utf8'. This is not the same as String.prototype.length since that returns the number of characters in a string.

        Parameters

        • string: string | __type | DataView | ArrayBuffer

          string to test. (TypedArray is also allowed, but it is only available starting ES2017)

        • Optional encoding: string

          encoding used to evaluate (defaults to 'utf8')

        Returns number

    • compare: function
      • The same as buf1.compare(buf2).

        Parameters

        Returns number

    • concat: function
      • concat(list: ReadonlyArray<__type>, totalLength?: number): __type
      • Returns a buffer which is the result of concatenating all the buffers in the list together.

        If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. If the list has exactly one item, then the first item of the list is returned. If the list has more than one item, then a new Buffer is created.

        Parameters

        • list: ReadonlyArray<__type>

          An array of Buffer objects to concatenate

        • Optional totalLength: number

          Total length of the buffers when concatenated. If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.

        Returns __type

    • from: function
      • from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): __type
      • from(data: ReadonlyArray<any> | string | __type | ArrayBuffer): __type
      • from(str: string, encoding?: string): __type
      • When passed a reference to the .buffer property of a TypedArray instance, the newly created Buffer will share the same allocated memory as the TypedArray. The optional {byteOffset} and {length} arguments specify a memory range within the {arrayBuffer} that will be shared by the Buffer.

        Parameters

        • arrayBuffer: ArrayBuffer

          The .buffer property of a TypedArray or a new ArrayBuffer()

        • Optional byteOffset: number
        • Optional length: number

        Returns __type

      • Creates a new Buffer using the passed {data}

        Parameters

        • data: ReadonlyArray<any> | string | __type | ArrayBuffer

          data to create a new Buffer

        Returns __type

      • Creates a new Buffer containing the given JavaScript string {str}. If provided, the {encoding} parameter identifies the character encoding. If not provided, {encoding} defaults to 'utf8'.

        Parameters

        • str: string
        • Optional encoding: string

        Returns __type

    • isBuffer: function
      • isBuffer(obj: any): obj
      • Returns true if {obj} is a Buffer

        Parameters

        • obj: any

          object to test.

        Returns obj

    • isEncoding: function
      • isEncoding(encoding: string): boolean
      • Returns true if {encoding} is a valid encoding argument. Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'

        Parameters

        • encoding: string

          string to test.

        Returns boolean

Const loadGetRandomValues

  • loadGetRandomValues(): void

Const loadNetInfo

Const loadOrCreateMultipartUpload

  • Load the in-progress multipart upload from local storage or async storage(RN) if it exists, or create a new multipart upload.

    internal

    Parameters

    • __namedParameters: object
      • abortSignal: AbortSignal
      • accessLevel: "guest" | "protected" | "private"
      • bucket: string
      • contentDisposition: string
      • contentEncoding: string
      • contentType: string
      • data: string | Blob | ArrayBufferView | ArrayBuffer
      • key: string
      • keyPrefix: string
      • metadata: object
      • s3Config: object
        • credentials: AWSCredentials
        • Optional customEndpoint?: string
        • Optional forcePathStyle?: boolean
        • region: string
        • Optional useAccelerateEndpoint?: boolean
      • size: number

    Returns Promise<LoadOrCreateMultipartUploadResult>

Const loadUrlPolyfill

  • loadUrlPolyfill(): void

makeCamelCase

  • makeCamelCase(obj?: any, keys?: string[]): object
  • Changes object keys to camel case. If optional parameter keys is given, then we extract only the keys specified in keys.

    Parameters

    • Optional obj: any
    • Optional keys: string[]

    Returns object

makeCamelCaseArray

  • makeCamelCaseArray(objArr?: object[], keys?: string[]): object[]

Const map

  • map<Instructions>(obj: Record<string, any>, instructions: Instructions): object
  • Maps an object to a new object using the provided instructions. The instructions are a map of the returning mapped object's property names to a single instruction of how to map the value from the original object to the new object. There are two types of instructions:

    1. A string representing the property name of the original object to map to the new object. The value mapped from the original object will be the same as the value in the new object, and it can ONLY be string.

    2. An array of two elements. The first element is the property name of the original object to map to the new object. The second element is a function that takes the value from the original object and returns the value to be mapped to the new object. The function can return any type.

    Example:

    const input = {
      Foo: 'foo',
      BarList: [{value: 'bar1'}, {value: 'bar2'}]
    }
    const output = map(input, {
      someFoo: 'Foo',
      bar: ['BarList', (barList) => barList.map(bar => bar.value)]
      baz: 'Baz' // Baz does not exist in input, so it will not be in the output.
    });
    // output = { someFoo: 'foo', bar: ['bar1', 'bar2'] }
    internal

    Type parameters

    • Instructions: object

    Parameters

    • obj: Record<string, any>

      The object containing the data to compose mapped object.

    • instructions: Instructions

      The instructions mapping the object values to the new object.

    Returns object

    A new object with the mapped values.

mapErrorToType

mapMfaType

mapSearchOptions

  • mapSearchOptions(options: any, locationServiceInput: any): any

Const matchesAttributes

  • matchesAttributes(__namedParameters: object, __namedParameters: object): boolean

Const matchesEventType

  • matchesEventType(__namedParameters: object, __namedParameters: object): boolean

Const matchesMetrics

  • matchesMetrics(__namedParameters: object, __namedParameters: object): boolean

mergePatches

  • mergePatches<T>(originalSource: T, oldPatches: Patch[], newPatches: Patch[]): Patch[]
  • merge two sets of patches created by immer produce. newPatches take precedent over oldPatches for patches modifying the same path. In the case many consecutive pathces are merged the original model should always be the root model.

    Example: A -> B, patches1 B -> C, patches2

    mergePatches(A, patches1, patches2) to get patches for A -> C

    Type parameters

    • T

    Parameters

    • originalSource: T

      the original Model the patches should be applied to

    • oldPatches: Patch[]

      immer produce patch list

    • newPatches: Patch[]

      immer produce patch list (will take precedence)

    Returns Patch[]

    merged patches

modelCreateTableStatement

  • modelCreateTableStatement(model: SchemaModel, userModel?: boolean): string

modelInsertStatement

modelInstanceCreator

modelUpdateStatement

monotonicUlidFactory

  • monotonicUlidFactory(seed?: number): ULID

montConvert

  • montConvert(x: BNP & object): number

montMulTo

  • montMulTo(x: object, y: number, r: number): void

montReduce

  • montReduce(x: object): void

montRevert

  • montRevert(x: object): number

montSqrTo

  • montSqrTo(x: object, r: number): void

mqttTopicMatch

  • mqttTopicMatch(filter: string, topic: string): boolean

Const multiAuthStrategy

  • multiAuthStrategy(amplifyContext: AmplifyContext): (Anonymous function)
  • Returns an array of auth modes to try based on the schema, model, and authenticated user (or lack thereof). Rules are sourced from getAuthRules and returned in the order they ought to be attempted.

    see

    sortAuthRulesWithPriority

    see

    getAuthRules

    Parameters

    Returns (Anonymous function)

    A sorted array of auth modes to attempt.

Const namespaceResolver

  • namespaceResolver(modelConstructor: object): string

nbi

  • nbi(): any

nbits

  • nbits(x: number): number

nbv

  • nbv(i: number): any

nextSSRDetect

  • nextSSRDetect(): boolean

nextWebDetect

  • nextWebDetect(): boolean

Const normalize

Const normalizeApnsMessage

Const normalizeFcmMessage

normalizeMessages

  • normalizeMessages(messages: PinpointInAppMessage[]): InAppMessage[]

normalizeMutationInput

Const normalizeNativeMessage

  • normalizeNativeMessage(nativeMessage?: NativeMessage): PushNotificationMessage | null

Const normalizeNativePermissionStatus

Const notifyEventListeners

  • notifyEventListeners(type: EventType, ...args: any[]): void

Const notifyEventListenersAndAwaitHandlers

  • notifyEventListenersAndAwaitHandlers(type: EventType, ...args: any[]): Promise<void[]>

notifyMessageInteraction

  • notifyMessageInteraction(__namedParameters: object): void
  • Notifies the respective listener of the specified type with the message given.

    throws

    validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.

    example
    onMessageRecieved((message) => {
      // Show end users the In-App message and notify event listeners
      notifyMessageInteraction({ type: 'messageDisplayed', message });
    });

    Parameters

    • __namedParameters: object
      • message: InAppMessage
      • type: "messageReceived" | "messageDisplayed" | "messageDismissed" | "messageActionTaken"

    Returns void

nuxtSSRDetect

  • nuxtSSRDetect(): boolean

nuxtWebDetect

  • nuxtWebDetect(): boolean

Const oAuthSignOutRedirect

oauthSignIn

  • oauthSignIn(__namedParameters: object): Promise<void>

Const observeFrameworkChanges

  • observeFrameworkChanges(fcn: function): void

observeQueryFactory

  • observeQueryFactory(models: any, model: SchemaModel): observeQuery

Const onComplete

onMessageActionTaken

onMessageDismissed

onMessageDisplayed

onMessageReceived

Const onNotificationOpened

  • onNotificationOpened(): never
  • onNotificationOpened(input: function): object

Const onNotificationReceivedInBackground

  • onNotificationReceivedInBackground(): never
  • onNotificationReceivedInBackground(input: function): object
  • Registers a listener that will be triggered when a notification is received while app is in a background state.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    remarks

    Notifications received while app is in a quit state will start the app (as a headless JS instance running on a background service on Android) in the background. Handlers registered via this function should return promises if it needs to be asynchronous (e.g. to perform some network requests). The app should run in the background as long as there are handlers still running (however, if they run for more than 30 seconds on iOS, subsequent tasks could get deprioritized!). If it is necessary for a handler to execute while the app is in quit state, it should be registered in the application entry point (e.g. index.js) since the application will not fully mount in that case.

    example
    // Register a listener
    onNotificationReceivedInBackground(message => {
      doSomething(message);
    });
    example
    // Register multiple listeners
    onNotificationReceivedInBackground(message => {
      doSomething(message);
    });
    
    onNotificationReceivedInBackground(message => {
      doSomethingElse(message);
    });
    example
    // Register async listener
    onNotificationReceivedInBackground(async message => {
      await doSomething(message);
      console.log(`did something with ${message}`);
    });

    Returns never

    • An object with a remove function to remove the listener.
  • Registers a listener that will be triggered when a notification is received while app is in a background state.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    remarks

    Notifications received while app is in a quit state will start the app (as a headless JS instance running on a background service on Android) in the background. Handlers registered via this function should return promises if it needs to be asynchronous (e.g. to perform some network requests). The app should run in the background as long as there are handlers still running (however, if they run for more than 30 seconds on iOS, subsequent tasks could get deprioritized!). If it is necessary for a handler to execute while the app is in quit state, it should be registered in the application entry point (e.g. index.js) since the application will not fully mount in that case.

    example
    // Register a listener
    onNotificationReceivedInBackground(message => {
      doSomething(message);
    });
    example
    // Register multiple listeners
    onNotificationReceivedInBackground(message => {
      doSomething(message);
    });
    
    onNotificationReceivedInBackground(message => {
      doSomethingElse(message);
    });
    example
    // Register async listener
    onNotificationReceivedInBackground(async message => {
      await doSomething(message);
      console.log(`did something with ${message}`);
    });

    Parameters

    Returns object

    • An object with a remove function to remove the listener.
    • remove: function
        • (): void
        • Returns void

Const onNotificationReceivedInForeground

  • onNotificationReceivedInForeground(): never
  • onNotificationReceivedInForeground(input: function): object
  • Registers a listener that will be triggered when a notification is received while app is in a foreground state.

    example
    // Register a listener
    onNotificationReceivedInForeground(message => {
      doSomething(message);
    });
    example
    // Register multiple listeners
    onNotificationReceivedInForeground(message => {
      doSomething(message);
    });
    
    onNotificationReceivedInForeground(message => {
      doSomethingElse(message);
    });

    Returns never

    • An object with a remove function to remove the listener.
  • Registers a listener that will be triggered when a notification is received while app is in a foreground state.

    example
    // Register a listener
    onNotificationReceivedInForeground(message => {
      doSomething(message);
    });
    example
    // Register multiple listeners
    onNotificationReceivedInForeground(message => {
      doSomething(message);
    });
    
    onNotificationReceivedInForeground(message => {
      doSomethingElse(message);
    });

    Parameters

    Returns object

    • An object with a remove function to remove the listener.
    • remove: function
        • (): void
        • Returns void

Const onTokenReceived

  • onTokenReceived(): never
  • onTokenReceived(input: function): object
  • Registers a listener that will be triggered when a token is received. A token will be received:

    1. On every app launch, including the first install
    2. When a token changes (this may happen if the service invalidates the token for any reason)
    example
    // Register a listener
    onTokenReceived(message => {
      doSomething(message);
    });
    example
    // Register multiple listeners
    onTokenReceived(message => {
      doSomething(message);
    });
    
    onTokenReceived(message => {
      doSomethingElse(message);
    });

    Returns never

    • An object with a remove function to remove the listener.
  • Registers a listener that will be triggered when a token is received. A token will be received:

    1. On every app launch, including the first install
    2. When a token changes (this may happen if the service invalidates the token for any reason)
    example
    // Register a listener
    onTokenReceived(message => {
      doSomething(message);
    });
    example
    // Register multiple listeners
    onTokenReceived(message => {
      doSomething(message);
    });
    
    onTokenReceived(message => {
      doSomethingElse(message);
    });

    Parameters

    • input: function
        • (token: string): void
        • Parameters

          • token: string

          Returns void

    Returns object

    • An object with a remove function to remove the listener.
    • remove: function
        • (): void
        • Returns void

Const openAuthSession

Const openAuthSessionAndroid

  • openAuthSessionAndroid(url: string, redirectUrls: string[]): Promise<string>

Const openAuthSessionAsync

  • openAuthSessionAsync(url: string, redirectUrls: string[], prefersEphemeralSession?: boolean): Promise<string>

Const openAuthSessionIOS

  • openAuthSessionIOS(url: string, redirectUrls: string[], prefersEphemeralSession?: boolean): Promise<string>

orderByClauseFromSort

Const parseAWSExports

parseAttributes

  • parseAttributes(attributes: string | undefined): string[]

Const parseDevicesResponse

Const parseJsonBody

Const parseJsonError

parseMFATypes

Const parseMetadata

parseRedirectURL

  • parseRedirectURL(): Promise<void>

Const parseRestApiServiceError

  • parseRestApiServiceError(response?: HttpResponse): Promise<RestApiError & MetadataBearer | undefined>

Const parseServiceInfo

  • parseServiceInfo(url: __type): object

Const parseSigningInfo

  • parseSigningInfo(url: __type, restApiOptions?: object): object
  • Infer the signing service and region from the given URL, and for REST API only, from the Amplify configuration. It supports raw API Gateway endpoint and AppSync endpoint.

    internal

    Parameters

    • url: __type
    • Optional restApiOptions: object
      • amplify: AmplifyClassV6
      • apiName: string

    Returns object

    • region: string
    • service: string

Const parseSocialProviders

  • parseSocialProviders(aws_cognito_social_providers: string[]): ("Amazon" | "Apple" | "Facebook" | "Google")[]

Const parseXmlBody

  • parseXmlBody(response: HttpResponse): Promise<any>

Const parseXmlBodyOrThrow

  • parseXmlBodyOrThrow(response: HttpResponse): Promise<any>

Const parseXmlError

  • parseXmlError(response?: HttpResponse): Promise<Error & object>

Const parseXmlNode

  • parseXmlNode(node: Node): any

Const patch

Const post

  • POST HTTP request POST HTTP request (server-side) Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:

    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header. Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:
    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    internal
    throws
    example

    Send a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { body } = await post({
      apiName,
      path,
      options: {
        headers, // Optional, A map of custom header key/values
        body, // Optional, JSON object or FormData
        queryParams, // Optional, A map of query strings
      }
    }).response;
    const data = await body.json();
    example

    Cancel a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { response, cancel } = post({apiName, path, options});
    cancel(message);
    try {
      await response;
    } cache (e) {
      if (isCancelError(e)) {
       // handle request cancellation
      }
      //...
    }
    throws
    example

    Send a POST request

    import { post } from 'aws-amplify/api/server';
    //...
    const restApiResponse = await runWithAmplifyServerContext({
      nextServerContext: { request, response },
      operation: async (contextSpec) => {
        try {
          const { body } = await post(contextSpec, input).response;
          return await body.json();
        } catch (error) {
          console.log(error);
          return false;
        }
      },
    });
    internal
    internal

    Parameters

    • amplify: AmplifyClassV6
    • __namedParameters: object
      • abortController: AbortController
      • options: object & object
      • url: __type

    Returns Promise<RestApiResponse>

    Operation for POST request

  • POST HTTP request POST HTTP request (server-side) Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:

    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header. Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:
    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    internal
    throws
    example

    Send a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { body } = await post({
      apiName,
      path,
      options: {
        headers, // Optional, A map of custom header key/values
        body, // Optional, JSON object or FormData
        queryParams, // Optional, A map of query strings
      }
    }).response;
    const data = await body.json();
    example

    Cancel a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { response, cancel } = post({apiName, path, options});
    cancel(message);
    try {
      await response;
    } cache (e) {
      if (isCancelError(e)) {
       // handle request cancellation
      }
      //...
    }
    throws
    example

    Send a POST request

    import { post } from 'aws-amplify/api/server';
    //...
    const restApiResponse = await runWithAmplifyServerContext({
      nextServerContext: { request, response },
      operation: async (contextSpec) => {
        try {
          const { body } = await post(contextSpec, input).response;
          return await body.json();
        } catch (error) {
          console.log(error);
          return false;
        }
      },
    });
    internal
    internal

    Parameters

    Returns PostOperation

    Operation for POST request

  • POST HTTP request POST HTTP request (server-side) Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:

    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header. Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:
    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    internal
    throws
    example

    Send a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { body } = await post({
      apiName,
      path,
      options: {
        headers, // Optional, A map of custom header key/values
        body, // Optional, JSON object or FormData
        queryParams, // Optional, A map of query strings
      }
    }).response;
    const data = await body.json();
    example

    Cancel a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { response, cancel } = post({apiName, path, options});
    cancel(message);
    try {
      await response;
    } cache (e) {
      if (isCancelError(e)) {
       // handle request cancellation
      }
      //...
    }
    throws
    example

    Send a POST request

    import { post } from 'aws-amplify/api/server';
    //...
    const restApiResponse = await runWithAmplifyServerContext({
      nextServerContext: { request, response },
      operation: async (contextSpec) => {
        try {
          const { body } = await post(contextSpec, input).response;
          return await body.json();
        } catch (error) {
          console.log(error);
          return false;
        }
      },
    });
    internal
    internal

    Parameters

    Returns PostOperation

    Operation for POST request

  • POST HTTP request POST HTTP request (server-side) Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:

    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header. Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:
    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    internal
    throws
    example

    Send a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { body } = await post({
      apiName,
      path,
      options: {
        headers, // Optional, A map of custom header key/values
        body, // Optional, JSON object or FormData
        queryParams, // Optional, A map of query strings
      }
    }).response;
    const data = await body.json();
    example

    Cancel a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { response, cancel } = post({apiName, path, options});
    cancel(message);
    try {
      await response;
    } cache (e) {
      if (isCancelError(e)) {
       // handle request cancellation
      }
      //...
    }
    throws
    example

    Send a POST request

    import { post } from 'aws-amplify/api/server';
    //...
    const restApiResponse = await runWithAmplifyServerContext({
      nextServerContext: { request, response },
      operation: async (contextSpec) => {
        try {
          const { body } = await post(contextSpec, input).response;
          return await body.json();
        } catch (error) {
          console.log(error);
          return false;
        }
      },
    });
    internal
    internal

    Parameters

    Returns PostOperation

    Operation for POST request

  • POST HTTP request POST HTTP request (server-side) Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:

    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header. Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:
    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    internal
    throws
    example

    Send a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { body } = await post({
      apiName,
      path,
      options: {
        headers, // Optional, A map of custom header key/values
        body, // Optional, JSON object or FormData
        queryParams, // Optional, A map of query strings
      }
    }).response;
    const data = await body.json();
    example

    Cancel a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { response, cancel } = post({apiName, path, options});
    cancel(message);
    try {
      await response;
    } cache (e) {
      if (isCancelError(e)) {
       // handle request cancellation
      }
      //...
    }
    throws
    example

    Send a POST request

    import { post } from 'aws-amplify/api/server';
    //...
    const restApiResponse = await runWithAmplifyServerContext({
      nextServerContext: { request, response },
      operation: async (contextSpec) => {
        try {
          const { body } = await post(contextSpec, input).response;
          return await body.json();
        } catch (error) {
          console.log(error);
          return false;
        }
      },
    });
    internal
    internal

    Parameters

    Returns Promise<RestApiResponse>

    Operation for POST request

  • POST HTTP request POST HTTP request (server-side) Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:

    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header. Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:
    • If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM auth. You MUST also set 'input.options.signingServiceInfo' option.
      • The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are optional. If omitted, the signing service and region will be inferred from url.
    • If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.
    • If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.
    • If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    To make the internal post cancellable, you must also call updateRequestToBeCancellable() with the promise from internal post call and the abort controller supplied to the internal post call.

    internal
    throws
    example

    Send a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { body } = await post({
      apiName,
      path,
      options: {
        headers, // Optional, A map of custom header key/values
        body, // Optional, JSON object or FormData
        queryParams, // Optional, A map of query strings
      }
    }).response;
    const data = await body.json();
    example

    Cancel a POST request

    import { post, isCancelError } from '@aws-amplify/api';
    
    const { response, cancel } = post({apiName, path, options});
    cancel(message);
    try {
      await response;
    } cache (e) {
      if (isCancelError(e)) {
       // handle request cancellation
      }
      //...
    }
    throws
    example

    Send a POST request

    import { post } from 'aws-amplify/api/server';
    //...
    const restApiResponse = await runWithAmplifyServerContext({
      nextServerContext: { request, response },
      operation: async (contextSpec) => {
        try {
          const { body } = await post(contextSpec, input).response;
          return await body.json();
        } catch (error) {
          console.log(error);
          return false;
        }
      },
    });
    internal
    internal

    Parameters

    Returns Promise<RestApiResponse>

    Operation for POST request

predicateFor

predicateToGraphQLCondition

predicateToGraphQLFilter

  • remarks

    Flattens redundant list predicates

    example
    { and:[{ and:[{ username:  { eq: 'bob' }}] }] }

    Becomes

    { and:[{ username: { eq: 'bob' }}] }

    Parameters

    • predicatesGroup: PredicatesGroup<any>

      Predicate Group

    • Default value fieldsToOmit: string[] = []
    • Default value root: boolean = true

    Returns GraphQLFilter

    GQL Filter Expression from Predicate Group

prepareValueForDML

  • prepareValueForDML(value: unknown): any

Const presignUrl

  • presignUrl(__namedParameters: object, __namedParameters: object): __type

Const prng

  • prng(): number

Const processCompositeKeys

Const processExists

  • processExists(): boolean

processInAppMessages

Const publicHandler

Const put

Const putEventsDeserializer

Const putEventsSerializer

Const putObjectDeserializer

Const putObjectJob

  • putObjectJob(__namedParameters: object, abortSignal: AbortSignal, totalLength?: number): (Anonymous function)
  • Get a function the returns a promise to call putObject API to S3.

    internal

    Parameters

    • __namedParameters: object
      • data: string | Blob | ArrayBufferView | ArrayBuffer
      • key: string
      • uploadDataOptions: object & object & object & object
    • abortSignal: AbortSignal
    • Optional totalLength: number

    Returns (Anonymous function)

Const putObjectSerializer

queryAllStatement

queryByIdStatement

queryOneStatement

Const randomBytes

  • randomBytes(nBytes: number): Uint8Array

reactNativeDetect

  • reactNativeDetect(): boolean

reactSSRDetect

  • reactSSRDetect(): boolean

reactWebDetect

  • reactWebDetect(): boolean

Const readBlobAsText

  • readBlobAsText(blob: Blob): Promise<string>

Const readFile

  • readFile(file: Blob): Promise<ArrayBuffer>

Const readFileToBase64

  • readFileToBase64(blob: Blob): Promise<string>

Const record

  • record(input: RecordInput): void
  • record(__namedParameters: object): void
  • record(__namedParameters: object): void
  • record(__namedParameters: object): void
  • record(__namedParameters: object): Promise<void>
  • Records an Analytic event to Pinpoint. Events will be buffered and periodically sent to Pinpoint.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    example
    // Send an event to Pinpoint
    record({ name: eventName })
    example
    // Send an event to Pinpoint with metrics & custom attributes
    record({
        name: eventName,
        attributes: {
            'my-attribute': attributeValue
        },
        metrics: {
            'my-metric': metricValue
        }
    })
    internal

    Parameters

    Returns void

  • Records an Analytic event to Pinpoint. Events will be buffered and periodically sent to Pinpoint.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    example
    // Send an event to Pinpoint
    record({ name: eventName })
    example
    // Send an event to Pinpoint with metrics & custom attributes
    record({
        name: eventName,
        attributes: {
            'my-attribute': attributeValue
        },
        metrics: {
            'my-metric': metricValue
        }
    })
    internal

    Parameters

    • __namedParameters: object
      • data: object | Uint8Array
      • partitionKey: string
      • streamName: string

    Returns void

  • Records an Analytic event to Pinpoint. Events will be buffered and periodically sent to Pinpoint.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    example
    // Send an event to Pinpoint
    record({ name: eventName })
    example
    // Send an event to Pinpoint with metrics & custom attributes
    record({
        name: eventName,
        attributes: {
            'my-attribute': attributeValue
        },
        metrics: {
            'my-metric': metricValue
        }
    })
    internal

    Parameters

    • __namedParameters: object
      • data: object | Uint8Array
      • streamName: string

    Returns void

  • Records an Analytic event to Pinpoint. Events will be buffered and periodically sent to Pinpoint.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    example
    // Send an event to Pinpoint
    record({ name: eventName })
    example
    // Send an event to Pinpoint with metrics & custom attributes
    record({
        name: eventName,
        attributes: {
            'my-attribute': attributeValue
        },
        metrics: {
            'my-metric': metricValue
        }
    })
    internal

    Parameters

    • __namedParameters: object
      • eventId: string
      • eventType: string
      • properties: object
      • userId: string

    Returns void

  • Records an Analytic event to Pinpoint. Events will be buffered and periodically sent to Pinpoint.

    throws

    validation: AnalyticsValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect.

    example
    // Send an event to Pinpoint
    record({ name: eventName })
    example
    // Send an event to Pinpoint with metrics & custom attributes
    record({
        name: eventName,
        attributes: {
            'my-attribute': attributeValue
        },
        metrics: {
            'my-metric': metricValue
        }
    })
    internal

    Parameters

    • __namedParameters: object
      • appId: string
      • bufferSize: number
      • category: "InAppMessaging" | "PushNotification" | "Analytics" | "Core"
      • channelType: "APNS" | "APNS_SANDBOX" | "GCM" | "IN_APP"
      • credentials: object
        • accessKeyId: string
        • Optional expiration?: Date
        • secretAccessKey: string
        • Optional sessionToken?: string
      • event: object
        • Optional attributes?: Record<string, string>
        • Optional metrics?: Record<string, number>
        • name: string
      • flushInterval: number
      • flushSize: number
      • identityId: string
      • region: string
      • resendLimit: number
      • userAgentValue: string

    Returns Promise<void>

Const recordAnalyticsEvent

Const recordEvent

Const recordMessageEvent

  • recordMessageEvent(__namedParameters: object): Promise<void>

recursivePredicateFor

  • Creates a "seed" predicate that can be used to build an executable condition. This is used in query(), for example, to seed customer- E.g.,

    const p = predicateFor({builder: modelConstructor, schema: modelSchema, pkField: string[]});
    p.and(child => [
      child.field.eq('whatever'),
      child.childModel.childField.eq('whatever else'),
      child.childModel.or(child => [
        child.otherField.contains('x'),
        child.otherField.contains('y'),
        child.otherField.contains('z'),
      ])
    ])

    predicateFor() returns objecst with recursive getters. To facilitate this, a query and tail can be provided to "accumulate" nested conditions.

    Type parameters

    Parameters

    • ModelType: ModelMeta<T>

      The ModelMeta used to build child properties.

    • Default value allowRecursion: boolean = true
    • Optional field: string

      Scopes the query branch to a field.

    • Optional query: GroupCondition

      A base query to build on. Omit to start a new query.

    • Optional tail: GroupCondition

      The point in an existing query to attach new conditions to.

    Returns RecursiveModelPredicate<T> & PredicateInternalsKey

    A ModelPredicate (builder) that customers can create queries with. (As shown in function description.)

Const refreshAuthTokens

Const registerDevice

  • registerDevice(address: string): Promise<void>

Const registerHeadlessTask

  • registerHeadlessTask(task: function): void

registerNonModelClass

Const registerPredicateInternals

  • registerPredicateInternals(condition: GroupCondition, key?: any): any
  • Creates a link between a key (and generates a key if needed) and an internal GroupCondition, which allows us to return a key object instead of the gory conditions details to customers/invoking code.

    Parameters

    • condition: GroupCondition

      The internal condition to keep hidden.

    • Optional key: any

      The object DataStore will use to find the internal condition. If no key is given, an empty one is created.

    Returns any

rememberDevice

Const remove

Const removeCachedUpload

  • removeCachedUpload(cacheKey: string): Promise<void>

removePaddingChar

  • removePaddingChar(base64Encoded: string): string

repackageUnauthError

  • repackageUnauthError<T>(content: T): T

repeatedFieldInGroup

  • example

    returns "username"

    { type: "and", predicates: [
            { field: "username", operator: "beginsWith", operand: "a" },
            { field: "username", operator: "contains", operand: "abc" },
    ] }

    Parameters

    Returns string | null

    name of repeated field | null

Const requestPermissions

  • Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can choose not to request specific permissions. The resulting promise will resolve to true if requested permissions are granted (or have previously been granted) or false otherwise. Not all specific permissions are supported by platforms your React Native app can run on but will be safely ignored even on those platforms. Currently supported permissions:

    • alert: When set to true, requests the ability to display notifications to the user.

    • sound: When set to true, requests the ability to play a sound in response to notifications.

    • badge: When set to true, requests the ability to update the app's badge.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    // Request all permissions by default
    const arePermissionsGranted = await requestPermissions();
    
    @example
    ```ts
    // Prevent requesting specific permissions
    const arePermissionsGranted = await requestPermissions({
      sound: false,
      badge: false
    });

    Returns Promise<never>

    A promise that resolves to true if requested permissions are granted or have already previously been granted or false otherwise.

  • Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can choose not to request specific permissions. The resulting promise will resolve to true if requested permissions are granted (or have previously been granted) or false otherwise. Not all specific permissions are supported by platforms your React Native app can run on but will be safely ignored even on those platforms. Currently supported permissions:

    • alert: When set to true, requests the ability to display notifications to the user.

    • sound: When set to true, requests the ability to play a sound in response to notifications.

    • badge: When set to true, requests the ability to update the app's badge.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    // Request all permissions by default
    const arePermissionsGranted = await requestPermissions();
    
    @example
    ```ts
    // Prevent requesting specific permissions
    const arePermissionsGranted = await requestPermissions({
      sound: false,
      badge: false
    });

    Parameters

    Returns Promise<boolean>

    A promise that resolves to true if requested permissions are granted or have already previously been granted or false otherwise.

  • Requests notification permissions from your user. By default, Amplify requests all supported permissions but you can choose not to request specific permissions. The resulting promise will resolve to true if requested permissions are granted (or have previously been granted) or false otherwise. Not all specific permissions are supported by platforms your React Native app can run on but will be safely ignored even on those platforms. Currently supported permissions:

    • alert: When set to true, requests the ability to display notifications to the user.

    • sound: When set to true, requests the ability to play a sound in response to notifications.

    • badge: When set to true, requests the ability to update the app's badge.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    // Request all permissions by default
    const arePermissionsGranted = await requestPermissions();
    
    @example
    ```ts
    // Prevent requesting specific permissions
    const arePermissionsGranted = await requestPermissions({
      sound: false,
      badge: false
    });

    Parameters

    • Default value __namedParameters: object = {alert: true,badge: true,sound: true,}
      • alert: boolean
      • badge: boolean
      • sound: boolean

    Returns Promise<boolean>

    A promise that resolves to true if requested permissions are granted or have already previously been granted or false otherwise.

resendSignUpCode

resetAutoSignIn

  • resetAutoSignIn(): void

resetPassword

resetTimeout

  • resetTimeout(framework: Framework, delay: number): void

Const resolveAccessLevel

Const resolveApiUrl

  • resolveApiUrl(amplify: AmplifyClassV6, apiName: string, path: string, queryParams?: Record<string, string>): __type
  • Resolve the REST API request URL by:

    1. Loading the REST API endpoint from the Amplify configuration with corresponding API name.
    2. Appending the path to the endpoint.
    3. Merge the query parameters from path and the queryParameter argument which is taken from the public REST API options.
    4. Validating the resulting URL string.
    internal

    Parameters

    • amplify: AmplifyClassV6
    • apiName: string
    • path: string
    • Optional queryParams: Record<string, string>

    Returns __type

Const resolveBotConfig

Const resolveCachedSession

  • resolveCachedSession(): Promise<object>

Const resolveConfig

  • resolveConfig(): object
  • resolveConfig(): object
  • resolveConfig(): object
  • resolveConfig(): object
  • resolveConfig(amplify: AmplifyClassV6): object
  • resolveConfig(): object
  • resolveConfig(): object

Const resolveCredentials

  • resolveCredentials(): Promise<object>
  • resolveCredentials(): Promise<object>
  • resolveCredentials(amplify: AmplifyClassV6): Promise<object>
  • resolveCredentials(): Promise<object>
  • resolveCredentials(): Promise<object>

Const resolveEndpointId

  • resolveEndpointId(__namedParameters: object): Promise<string>
  • Resolves an endpoint id from cache or prepare via updateEndpoint if one does not already exist, which will generate and cache an endpoint id between calls.

    internal

    Parameters

    • __namedParameters: object
      • address: string
      • appId: string
      • category: "InAppMessaging" | "PushNotification" | "Analytics" | "Core"
      • channelType: "APNS" | "APNS_SANDBOX" | "GCM" | "IN_APP"
      • credentials: object
        • accessKeyId: string
        • Optional expiration?: Date
        • secretAccessKey: string
        • Optional sessionToken?: string
      • identityId: string
      • region: string
      • userAgentValue: string

    Returns Promise<string>

Const resolveHeaders

  • resolveHeaders(headers?: Record<string, string>, body?: unknown): object

Const resolveLibraryOptions

  • resolveLibraryOptions(amplify: AmplifyClassV6): object

resolveOwnerFields

  • resolveOwnerFields(model: Model): string[]

resolvePKFields

Const resolvePrefix

  • resolvePrefix(__namedParameters: object): string

Const resolveS3ConfigAndInput

resolveServiceErrorStatusCode

  • resolveServiceErrorStatusCode(error: unknown): number | null

Const retryMiddleware

  • retryMiddleware<TInput, TOutput>(__namedParameters: object): (Anonymous function)
  • Retry middleware

    Type parameters

    • TInput

    • TOutput

    Parameters

    • __namedParameters: object
      • abortSignal: AbortSignal
      • computeDelay: function
          • (attempt: number): number
          • Parameters

            • attempt: number

            Returns number

      • maxAttempts: number
      • retryDecider: function
          • (response?: TResponse, error?: unknown): Promise<boolean>
          • Parameters

            • Optional response: TResponse
            • Optional error: unknown

            Returns Promise<boolean>

    Returns (Anonymous function)

retryOnResourceNotFoundException

  • retryOnResourceNotFoundException<F>(func: F, args: Parameters<F>, username: string, tokenOrchestrator: AuthTokenOrchestrator): Promise<ReturnType<F>>

Const retryWhenErrorWith200StatusCode

  • retryWhenErrorWith200StatusCode(response?: HttpResponse, error?: unknown): Promise<boolean>

Const runWithAmplifyServerContext

  • runWithAmplifyServerContext(amplifyConfig: object, libraryOptions: object, operation: function): Promise<Result>

selectionSetIRToString

  • selectionSetIRToString(obj: Record<string, string | any>): string

Const send

Const sendUserAttributeVerificationCode

Const serializeCompletedMultipartUpload

Const serializeCompletedPartList

Const serializeMetadata

  • serializeMetadata(metadata?: Record<string, string>): Record<string, string>

Const serializeObjectConfigsToHeaders

Const serializePathnameObjectKey

  • serializePathnameObjectKey(url: __type, key: string): string

Const serializeSetCookieOptions

Const serverError

  • serverError(error: any): boolean

sessionStateChangeHandler

Const sessionTokenRequiredInSigning

  • sessionTokenRequiredInSigning(service: string): boolean

setActiveSignInState

setActiveSignInUsername

  • setActiveSignInUsername(username: string): void

setAutoSignIn

setAutoSignInStarted

  • setAutoSignInStarted(value: boolean): void

Const setBadgeCount

  • setBadgeCount(): never
  • setBadgeCount(input: number): void
  • setBadgeCount(count: number): void
  • Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even when your React Native app is running on platforms where badges are not supported.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    setBadgeCount(42);

    Returns never

  • Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even when your React Native app is running on platforms where badges are not supported.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    setBadgeCount(42);

    Parameters

    • input: number

    Returns void

  • Sets the current badge count (the number on the top right corner of your app's icon). Setting the badge count to 0 (zero) will remove the badge from your app's icon. This function is safe to call (but will be ignored) even when your React Native app is running on platforms where badges are not supported.

    throws

    platform: PlatformNotSupportedError - Thrown if called against an unsupported platform. Currently, only React Native is supported by this API.

    example
    setBadgeCount(42);

    Parameters

    • count: number

    Returns void

Const setCache

  • setCache(key: string, value: unknown): void

setConflictHandler

  • Set a conflict handler that will be used to resolve conflicts that may emerge when matching events with synced messages.

    remark

    The conflict handler is not persisted across app restarts and so must be set again before dispatching an event for any custom handling to take effect.

    throws

    validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.

    example
    // Sync messages before dispatching an event
    await syncMessages();
    
    // Example custom conflict handler
    const myConflictHandler = (messages) => {
            // Return a random message
            const randomIndex = Math.floor(Math.random() * messages.length);
            return messages[randomIndex];
     };
    
    // Set the conflict handler
    setConflictHandler(myConflictHandler);
    
    // Dispatch an event
    await dispatchEvent({ name: 'test_event' });

    Parameters

    Returns void

Const setCustomUserAgent

  • Sets custom user agent state which will be appended to applicable requests. Returns a function that can be used to clean up any custom state set with this API.

    note

    This API operates globally. Calling this API multiple times will result in the most recently set values for a particular API being used.

    note

    This utility IS NOT compatible with SSR.

    Parameters

    Returns function

      • (): void
      • Returns void

setDailyCount

  • setDailyCount(count: number): void

setSessionCount

  • setSessionCount(messageId: string, count: number): void

Const setToken

  • setToken(newToken: string): void

setTotalCount

  • setTotalCount(messageId: string, count: number): Promise<void>

setTotalCountMap

setUpTOTP

setUsernameUsedForAutoSignIn

  • setUsernameUsedForAutoSignIn(username?: string): void

Const shouldSendBody

  • shouldSendBody(method: string): boolean

signIn

  • Signs a user in

    throws

    service: ,

    • Cognito service errors thrown during the sign-in process.
    throws

    validation: - Validation errors thrown when either username or password are not defined.

    throws

    AuthTokenConfigException - Thrown when the token provider config is invalid.

    Parameters

    Returns Promise<SignInOutput>

    SignInOutput

Const signInReducer

  • signInReducer(state: object, action: object | object | object | object | object): object

signInWithCustomAuth

signInWithCustomSRPAuth

signInWithRedirect

signInWithSRP

signInWithUserPassword

signOut

Const signRequest

Const signingMiddleware

  • signingMiddleware(__namedParameters: object): (Anonymous function)
  • Middleware that SigV4 signs request with AWS credentials, and correct system clock offset. This middleware is expected to be placed after retry middleware.

    Parameters

    • __namedParameters: object
      • credentials: AwsCredentialIdentity | function
      • region: string
      • service: string
      • uriEscapePath: boolean

    Returns (Anonymous function)

sortAuthRulesWithPriority

sortCompareFunction

Const startHTMLMediaAutoTracking

  • startHTMLMediaAutoTracking(element: HTMLMediaElement, recordEvent: IRecordEvent): void

Const startIframeAutoTracking

  • startIframeAutoTracking(element: HTMLElement, recordEvent: IRecordEvent): void

Const submitEvents

subscriptionFactory

svelteSSRDetect

  • svelteSSRDetect(): boolean

svelteWebDetect

  • svelteWebDetect(): boolean

syncExpression

syncMessages

  • Fetch and persist messages from Pinpoint campaigns. Calling this API is necessary to trigger InApp messages on the device.

    throws

    service exceptions - Thrown when the underlying Pinpoint service returns an error.

    throws

    validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.

    example
    // Sync InApp messages with Pinpoint and device.
    await syncMessages();
    

    Returns Promise<void>

    A promise that will resolve when the operation is complete.

toAttributeType

toAuthUserAttribute

toBase64

  • toBase64(input: string | ArrayBufferView): string

Const transferHandler

  • Make REST API call with best-effort IAM auth.

    internal

    Parameters

    • amplify: AmplifyClassV6

      Amplify instance to to resolve credentials and tokens. Should use different instance in client-side and SSR

    • options: HandlerOptions & object

      Options accepted from public API options when calling the handlers.

    • Optional signingServiceInfo: SigningServiceInfo

      Internal-only options enable IAM auth as well as to to overwrite the IAM signing service and region. If specified, and NONE of API Key header or Auth header is present, IAM auth will be used.

    Returns Promise<RestApiResponse>

Const traverseModel

  • traverseModel<T>(srcModelName: string, instance: T, namespace: SchemaNamespace, modelInstanceCreator: ModelInstanceCreator, getModelConstructorByModelName: function): object[]

Const unGzipBase64AsJson

  • unGzipBase64AsJson(gzipBase64: string | undefined): Promise<any>

unwrapObservableError

  • unwrapObservableError(observableError: any): any
  • Get the first error reason of an observable. Allows for error maps to be easily applied to observable errors

    Parameters

    • observableError: any

      an error from ZenObservable subscribe error callback

    Returns any

Const updateCachedSession

  • updateCachedSession(newUserId?: string, currentSessionId?: string, currentUserId?: string): void

Const updateEndpoint

  • updateEndpoint(__namedParameters: object): Promise<void>
  • internal
    internal

    Parameters

    • __namedParameters: object
      • address: string
      • appId: string
      • category: "InAppMessaging" | "PushNotification" | "Analytics" | "Core"
      • channelType: "APNS" | "APNS_SANDBOX" | "GCM" | "IN_APP"
      • credentials: object
        • accessKeyId: string
        • Optional expiration?: Date
        • secretAccessKey: string
        • Optional sessionToken?: string
      • identityId: string
      • optOut: "ALL" | "NONE"
      • region: string
      • userAgentValue: string
      • userAttributes: object
      • userId: string
      • userProfile: object
        • Optional customProperties?: Record<string, string[]>
        • Optional demographic?: object
          • Optional appVersion?: string
          • Optional locale?: string
          • Optional make?: string
          • Optional model?: string
          • Optional modelVersion?: string
          • Optional platform?: string
          • Optional platformVersion?: string
          • Optional timezone?: string
        • Optional email?: string
        • Optional location?: object
          • Optional city?: string
          • Optional country?: string
          • Optional latitude?: number
          • Optional longitude?: number
          • Optional postalCode?: string
          • Optional region?: string
        • Optional metrics?: Record<string, number>
        • Optional name?: string
        • Optional plan?: string

    Returns Promise<void>

Const updateEndpointDeserializer

Const updateEndpointSerializer

updateMFAPreference

updatePassword

Const updateProviderTrackers

Const updateRequestToBeCancellable

  • updateRequestToBeCancellable(promise: Promise<any>, controller: AbortController): void

Const updateSet

  • updateSet(model: any): [string, any[]]

Const updateUserAttribute

Const updateUserAttributes

Const uploadData

  • Upload data to specified S3 object. By default, it uses single PUT operation to upload if the data is less than 5MB. Otherwise, it uses multipart upload to upload the data. If the data length is unknown, it uses multipart upload.

    Limitations:

    • Maximum object size is 5TB.
    • Maximum object size if the size cannot be determined before upload is 50GB.
    throws

    service: S3Exception - thrown when checking for existence of the object

    throws

    validation: - Validation errors.

    example
    // Upload a file to s3 bucket
    await uploadData({ key, data: file, options: {
      onProgress, // Optional progress callback.
    } }).result;
    example
    // Cancel a task
    const uploadTask = uploadData({ key, data: file });
    //...
    uploadTask.cancel();
    try {
      await uploadTask.result;
    } catch (error) {
      if(isCancelError(error)) {
        // Handle error thrown by task cancelation.
      }
    }
    example
    // Pause and resume a task
    const uploadTask = uploadData({ key, data: file });
    //...
    uploadTask.pause();
    //...
    uploadTask.resume();
    //...
    await uploadTask.result;

    Parameters

    Returns UploadDataOutput

    A cancelable and resumable task exposing result promise from result property.

Const uploadPartDeserializer

Const uploadPartExecutor

  • uploadPartExecutor(__namedParameters: object): Promise<void>
  • Parameters

    • __namedParameters: object
      • abortSignal: AbortSignal
      • bucket: string
      • completedPartNumberSet: Set<number>
      • dataChunkerGenerator: Generator<object, void, undefined>
      • finalKey: string
      • isObjectLockEnabled: boolean
      • onPartUploadCompletion: function
          • (partNumber: number, eTag: string): void
          • Parameters

            • partNumber: number
            • eTag: string

            Returns void

      • onProgress: function
      • s3Config: object
        • credentials: AWSCredentials
        • Optional customEndpoint?: string
        • Optional forcePathStyle?: boolean
        • region: string
        • Optional useAccelerateEndpoint?: boolean
      • uploadId: string

    Returns Promise<void>

Const uploadPartSerializer

Const urlB64ToUint8Array

  • urlB64ToUint8Array(base64String: string): Uint8Array

urlListener

  • urlListener(): void

urlSafeDecode

  • urlSafeDecode(hex: string): string

urlSafeEncode

  • urlSafeEncode(str: string): string

Const userAgentMiddleware

  • userAgentMiddleware(__namedParameters: object): (Anonymous function)
  • Middleware injects user agent string to specified header(default to 'x-amz-user-agent'), if the header is not set already.

    TODO: incorporate new user agent design

    Parameters

    • __namedParameters: object
      • userAgentHeader: string
      • userAgentValue: string

    Returns (Anonymous function)

utf8Encode

  • utf8Encode(input: string): Uint8Array

validateCoordinates

validateGeofenceId

  • validateGeofenceId(geofenceId: GeofenceId): void

validateGeofencesInput

validateLinearRing

Const validateModelFields

validatePolygon

Const validatePredicate

  • validatePredicate<T>(model: T, groupType: keyof PredicateGroups<T>, predicatesOrGroups: (object | object)[]): any

Const validatePredicateField

  • validatePredicateField<T>(value: T, operator: keyof AllOperators, operand: T | []): boolean

validateS3RequiredParameter

  • validateS3RequiredParameter(assertion: boolean, paramName: string): assertion

validateState

  • validateState(state?: string | null): Promise<string>

Const validateTrackerConfiguration

valuesEqual

  • valuesEqual(valA: any, valB: any, nullish?: boolean): boolean

Const valuesFromModel

  • valuesFromModel(model: any): []

verifyTOTPSetup

vueSSRDetect

  • vueSSRDetect(): boolean

vueWebDetect

  • vueWebDetect(): boolean

webDetect

  • webDetect(): boolean

whereClauseFromPredicate

Const whereConditionFromPredicateObject

Const windowExists

  • windowExists(): boolean

Const withMemoization

  • withMemoization<T>(payloadAccessor: function): (Anonymous function)
  • Cache the payload of a response body. It allows multiple calls to the body, for example, when reading the body in both retry decider and error deserializer. Caching body is allowed here because we call the body accessor(blob(), json(), etc.) when body is small or streaming implementation is not available(RN).

    internal

    Type parameters

    • T

    Parameters

    Returns (Anonymous function)

Const xhrTransferHandler

Object literals

Const AWS_APPSYNC_REALTIME_HEADERS

AWS_APPSYNC_REALTIME_HEADERS: object

accept

accept: string = "application/json, text/javascript"

content-encoding

content-encoding: string = "amz-1.0"

content-type

content-type: string = "application/json; charset=UTF-8"

Const AuthTokenStorageKeys

AuthTokenStorageKeys: object

accessToken

accessToken: string = "accessToken"

clockDrift

clockDrift: string = "clockDrift"

deviceGroupKey

deviceGroupKey: string = "deviceGroupKey"

deviceKey

deviceKey: string = "deviceKey"

idToken

idToken: string = "idToken"

oidcProvider

oidcProvider: string = "oidcProvider"

randomPasswordKey

randomPasswordKey: string = "randomPasswordKey"

refreshToken

refreshToken: string = "refreshToken"

signInDetails

signInDetails: string = "signInDetails"

Const CONNECTION_CHANGE

CONNECTION_CHANGE: object

CLOSED

CLOSED: object

connectionState

connectionState: "disconnected" = "disconnected"

CLOSING_CONNECTION

CLOSING_CONNECTION: object

intendedConnectionState

intendedConnectionState: "disconnected" = "disconnected"

CONNECTION_ESTABLISHED

CONNECTION_ESTABLISHED: object

connectionState

connectionState: "connected" = "connected"

CONNECTION_FAILED

CONNECTION_FAILED: object

connectionState

connectionState: "disconnected" = "disconnected"

intendedConnectionState

intendedConnectionState: "disconnected" = "disconnected"

KEEP_ALIVE

KEEP_ALIVE: object

keepAliveState

keepAliveState: "healthy" = "healthy"

KEEP_ALIVE_MISSED

KEEP_ALIVE_MISSED: object

keepAliveState

keepAliveState: "unhealthy" = "unhealthy"

OFFLINE

OFFLINE: object

networkState

networkState: "disconnected" = "disconnected"

ONLINE

ONLINE: object

networkState

networkState: "connected" = "connected"

OPENING_CONNECTION

OPENING_CONNECTION: object

connectionState

connectionState: "connecting" = "connecting"

intendedConnectionState

intendedConnectionState: "connected" = "connected"

Const DEFAULT_KINESIS_CONFIG

DEFAULT_KINESIS_CONFIG: object

bufferSize

bufferSize: number = 1000

flushInterval

flushInterval: number = 5000

flushSize

flushSize: number = 100

resendLimit

resendLimit: number = 5

Const DEFAULT_KINESIS_FIREHOSE_CONFIG

DEFAULT_KINESIS_FIREHOSE_CONFIG: object

bufferSize

bufferSize: number = 1000

flushInterval

flushInterval: number = 5000

flushSize

flushSize: number = 100

resendLimit

resendLimit: number = 5

Const DEFAULT_PERSONALIZE_CONFIG

DEFAULT_PERSONALIZE_CONFIG: object

flushInterval

flushInterval: number = 5000

flushSize

flushSize: number = 5

Const DateUtils

DateUtils: object

This utility is intended to be deprecated and replaced by signRequest and presignUrl functions from clients/middleware/signing/signer/signatureV4.

TODO: refactor the logics here into signRequest and presignUrl functions and remove this class.

internal
deprecated

clockOffset

clockOffset: number = 0

Milliseconds to offset the date to compensate for clock skew between device & services

getClockOffset

  • getClockOffset(): number

getDateFromHeaderString

  • getDateFromHeaderString(header: string): Date

getDateWithClockOffset

  • getDateWithClockOffset(): Date

getHeaderStringFromDate

  • getHeaderStringFromDate(date?: Date): string

isClockSkewError

  • isClockSkewError(error: object): boolean

isClockSkewed

  • isClockSkewed(serverDate: Date): boolean

setClockOffset

  • setClockOffset(offset: number): void

Const DefaultAmplify

DefaultAmplify: object

configure

getConfig

Const IdentityIdStorageKeys

IdentityIdStorageKeys: object

identityId

identityId: string = "identityId"

Const Interactions

Interactions: object
deprecated

recommend to migrate to AWS Lex V2 instead

onComplete

onComplete: onComplete

send

send: send

Const LOG_LEVELS

LOG_LEVELS: object

DEBUG

DEBUG: number = 2

ERROR

ERROR: number = 5

INFO

INFO: number = 3

VERBOSE

VERBOSE: number = 1

WARN

WARN: number = 4

Const OAuthStorageKeys

OAuthStorageKeys: object

inflightOAuth

inflightOAuth: string = "inflightOAuth"

oauthPKCE

oauthPKCE: string = "oauthPKCE"

oauthSignIn

oauthSignIn: string = "oauthSignIn"

oauthState

oauthState: string = "oauthState"

Let _config

_config: object

language

language: null = null

Const amplifyErrorMap

amplifyErrorMap: object

[AmplifyErrorCode.NoEndpointId]

[AmplifyErrorCode.NoEndpointId]: object

message

message: string = "Endpoint ID was not found and was unable to be created."

[AmplifyErrorCode.PlatformNotSupported]

[AmplifyErrorCode.PlatformNotSupported]: object

message

message: string = "Function not supported on current platform."

[AmplifyErrorCode.Unknown]

[AmplifyErrorCode.Unknown]: object

message

message: string = "An unknown error occurred."

Const authConfigurationErrorMap

authConfigurationErrorMap: object

[AuthConfigurationErrorCode.AuthTokenConfigException]

[AuthConfigurationErrorCode.AuthTokenConfigException]: object

message

message: string = "Auth Token Provider not configured."

recoverySuggestion

recoverySuggestion: string = "Make sure to call Amplify.configure in your app."

[AuthConfigurationErrorCode.AuthUserPoolAndIdentityPoolException]

[AuthConfigurationErrorCode.AuthUserPoolAndIdentityPoolException]: object

message

message: string = "Auth UserPool or IdentityPool not configured."

recoverySuggestion

recoverySuggestion: string = "Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."

[AuthConfigurationErrorCode.AuthUserPoolException]

[AuthConfigurationErrorCode.AuthUserPoolException]: object

message

message: string = "Auth UserPool not configured."

recoverySuggestion

recoverySuggestion: string = "Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."

[AuthConfigurationErrorCode.InvalidIdentityPoolIdException]

[AuthConfigurationErrorCode.InvalidIdentityPoolIdException]: object

message

message: string = "Invalid identity pool id provided."

recoverySuggestion

recoverySuggestion: string = "Make sure a valid identityPoolId is given in the config."

[AuthConfigurationErrorCode.OAuthNotConfigureException]

[AuthConfigurationErrorCode.OAuthNotConfigureException]: object

message

message: string = "oauth param not configured."

recoverySuggestion

recoverySuggestion: string = "Make sure to call Amplify.configure with oauth parameter in your app."

Const authErrorMessages

authErrorMessages: object

autoSignInError

autoSignInError: object

message

message: AuthErrorStrings = AuthErrorStrings.AUTOSIGNIN_ERROR

default

default: object

message

message: AuthErrorStrings = AuthErrorStrings.DEFAULT_MSG

deviceConfig

deviceConfig: object

message

message: AuthErrorStrings = AuthErrorStrings.DEVICE_CONFIG

emptyChallengeResponse

emptyChallengeResponse: object

message

message: AuthErrorStrings = AuthErrorStrings.EMPTY_CHALLENGE

emptyCode

emptyCode: object

message

message: AuthErrorStrings = AuthErrorStrings.EMPTY_CODE

emptyPassword

emptyPassword: object

message

message: AuthErrorStrings = AuthErrorStrings.EMPTY_PASSWORD

emptyUsername

emptyUsername: object

message

message: AuthErrorStrings = AuthErrorStrings.EMPTY_USERNAME

invalidMFA

invalidMFA: object

message

message: AuthErrorStrings = AuthErrorStrings.INVALID_MFA

invalidUsername

invalidUsername: object

message

message: AuthErrorStrings = AuthErrorStrings.INVALID_USERNAME

missingAuthConfig

missingAuthConfig: object

log

log: string = `Error: Amplify has not been configured correctly.The configuration object is missing required auth properties.This error is typically caused by one of the following scenarios:1. Did you run \`amplify push\` after adding auth via \`amplify add auth\`?See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.`

message

message: AuthErrorStrings = AuthErrorStrings.DEFAULT_MSG

networkError

networkError: object

message

message: AuthErrorStrings = AuthErrorStrings.NETWORK_ERROR

noConfig

noConfig: object

log

log: string = `Error: Amplify has not been configured correctly.This error is typically caused by one of the following scenarios:1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry pointSee https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information2. There might be multiple conflicting versions of amplify packages in your node_modules.Refer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)`

message

message: AuthErrorStrings = AuthErrorStrings.DEFAULT_MSG

noMFA

noMFA: object

message

message: AuthErrorStrings = AuthErrorStrings.NO_MFA

noUserSession

noUserSession: object

message

message: AuthErrorStrings = AuthErrorStrings.NO_USER_SESSION

oauthSignInError

oauthSignInError: object

log

log: string = "Make sure Cognito Hosted UI has been configured correctly"

message

message: AuthErrorStrings = AuthErrorStrings.OAUTH_ERROR

signUpError

signUpError: object

log

log: string = "The first parameter should either be non-null string or object"

message

message: AuthErrorStrings = AuthErrorStrings.SIGN_UP_ERROR

Const authTypeMapping

authTypeMapping: object

AMAZON_COGNITO_USER_POOLS

AMAZON_COGNITO_USER_POOLS: string = "userPool"

API_KEY

API_KEY: string = "apiKey"

AWS_IAM

AWS_IAM: string = "iam"

LAMBDA

LAMBDA: string = "lambda"

NONE

NONE: string = "none"

OPENID_CONNECT

OPENID_CONNECT: string = "oidc"

Const base64Decoder

base64Decoder: object

convert

  • convert(input: string): string

Const base64Encoder

base64Encoder: object

convert

  • convert(input: string | Uint8Array, __namedParameters?: object): string

Const cacheErrorMap

cacheErrorMap: object

[CacheErrorCode.NoCacheItem]

[CacheErrorCode.NoCacheItem]: object

message

message: string = "Item not found in the cache storage."

[CacheErrorCode.NullNextNode]

[CacheErrorCode.NullNextNode]: object

message

message: string = "Next node is null."

[CacheErrorCode.NullPreviousNode]

[CacheErrorCode.NullPreviousNode]: object

message

message: string = "Previous node is null."

Const cognitoHostedUIIdentityProviderMap

cognitoHostedUIIdentityProviderMap: object

Amazon

Amazon: string = "LoginWithAmazon"

Apple

Apple: string = "SignInWithApple"

Facebook

Facebook: string = "Facebook"

Google

Google: string = "Google"

Const comparisonOperatorMap

comparisonOperatorMap: object

eq

eq: string = "="

ge

ge: string = ">="

gt

gt: string = ">"

le

le: string = "<="

lt

lt: string = "<"

ne

ne: string = "!="

Const connectionType

connectionType: object

BELONGS_TO

BELONGS_TO: string = "BELONGS_TO"

HAS_MANY

HAS_MANY: string = "HAS_MANY"

HAS_ONE

HAS_ONE: string = "HAS_ONE"

Const defaultConfig

defaultConfig: object

Default cache config

internal
internal
internal
internal
internal

cache

cache: string = "no-store"

capacityInBytes

capacityInBytes: number = 1048576

computeDelay

computeDelay: function = jitteredBackoff

Type declaration

    • (attempt: number): number
    • Parameters

      • attempt: number

      Returns number

defaultPriority

defaultPriority: number = 5

defaultTTL

defaultTTL: number = 259200000

endpointResolver

endpointResolver: endpointResolver

itemMaxSize

itemMaxSize: number = 210000

keyPrefix

keyPrefix: string = "aws-amplify-cache"

retryDecider

retryDecider: function = getRetryDecider(parseXmlError)

Type declaration

    • (response?: HttpResponse, error?: unknown): Promise<boolean>
    • Parameters

      • Optional response: HttpResponse
      • Optional error: unknown

      Returns Promise<boolean>

service

service: string = SERVICE_NAME

uriEscapePath

uriEscapePath: boolean = false

useAccelerateEndpoint

useAccelerateEndpoint: boolean = false

userAgentValue

userAgentValue: string = getAmplifyUserAgent()

warningThreshold

warningThreshold: number = 0.8

Const defaultPartition

defaultPartition: object

Default partition for AWS services. This is used when the region is not provided or the region is not recognized.

internal

id

id: string = "aws"

regionRegex

regionRegex: string = "^(us|eu|ap|sa|ca|me|af)\-\w+\-\d+$"

regions

regions: string[] = ['aws-global']

outputs

outputs: object

dnsSuffix

dnsSuffix: string = "amazonaws.com"

Const defaultSetCookieOptions

defaultSetCookieOptions: object

sameSite

sameSite: "lax" = "lax"

Const dummyMetadata

dummyMetadata: object

_deleted

_deleted: undefined = undefined!

_lastChangedAt

_lastChangedAt: undefined = undefined!

_version

_version: undefined = undefined!

Const errorMessages

errorMessages: object

deleteByPkWithCompositeKeyPresent

deleteByPkWithCompositeKeyPresent: string = "Models with composite primary keys cannot be deleted by a single key value, unless using a predicate. Use object literal syntax for composite keys instead: https://docs.amplify.aws/lib/datastore/advanced-workflows/q/platform/js/#querying-records-with-custom-primary-keys"

idEmptyString

idEmptyString: string = "An index field cannot contain an empty string value"

observeWithObjectLiteral

observeWithObjectLiteral: string = "Object literal syntax cannot be used with observe. Use a predicate instead: https://docs.amplify.aws/lib/datastore/data-access/q/platform/js/#predicates"

queryByPkWithCompositeKeyPresent

queryByPkWithCompositeKeyPresent: string = "Models with composite primary keys cannot be queried by a single key value. Use object literal syntax for composite keys instead: https://docs.amplify.aws/lib/datastore/advanced-workflows/q/platform/js/#querying-records-with-custom-primary-keys"

Const graphQLOperationsInfo

graphQLOperationsInfo: object

CREATE

CREATE: object

operationPrefix

operationPrefix: "create" = 'create' as const

usePlural

usePlural: boolean = false

DELETE

DELETE: object

operationPrefix

operationPrefix: "delete" = 'delete' as const

usePlural

usePlural: boolean = false

LIST

LIST: object

operationPrefix

operationPrefix: "list" = 'list' as const

usePlural

usePlural: boolean = true

OBSERVE_QUERY

OBSERVE_QUERY: object

operationPrefix

operationPrefix: "observeQuery" = 'observeQuery' as const

usePlural

usePlural: boolean = false

ONCREATE

ONCREATE: object

operationPrefix

operationPrefix: "onCreate" = 'onCreate' as const

usePlural

usePlural: boolean = false

ONDELETE

ONDELETE: object

operationPrefix

operationPrefix: "onDelete" = 'onDelete' as const

usePlural

usePlural: boolean = false

ONUPDATE

ONUPDATE: object

operationPrefix

operationPrefix: "onUpdate" = 'onUpdate' as const

usePlural

usePlural: boolean = false

READ

READ: object

operationPrefix

operationPrefix: "get" = 'get' as const

usePlural

usePlural: boolean = false

UPDATE

UPDATE: object

operationPrefix

operationPrefix: "update" = 'update' as const

usePlural

usePlural: boolean = false

Const i18nErrorMap

i18nErrorMap: object

[I18nErrorCode.NotConfigured]

[I18nErrorCode.NotConfigured]: object

message

message: string = "i18n is not configured."

Const logicalOperatorMap

logicalOperatorMap: object

beginsWith

beginsWith: string = "= 1"

between

between: string = "BETWEEN"

contains

contains: string = "> 0"

notContains

notContains: string = "= 0"

Const module

module: object

addMessageEventListener

addMessageEventListener: addMessageEventListener

addTokenEventListener

addTokenEventListener: addTokenEventListener

completeNotification

completeNotification: completeNotification

getBadgeCount

getBadgeCount: getBadgeCount

getConstants

getConstants: getConstants

getLaunchNotification

getLaunchNotification: getLaunchNotification

getPermissionStatus

getPermissionStatus: getPermissionStatus

openAuthSessionAsync

openAuthSessionAsync: openAuthSessionAsync

registerHeadlessTask

registerHeadlessTask: registerHeadlessTask

requestPermissions

requestPermissions: requestPermissions

setBadgeCount

setBadgeCount: setBadgeCount

Const mutationErrorMap

mutationErrorMap: object

BadModel

  • BadModel(): false

BadRecord

  • BadRecord(error: Error): boolean

ConfigError

  • ConfigError(): false

Transient

  • Transient(error: Error): boolean

Unauthorized

  • Unauthorized(error: Error): boolean

Const negations

negations: object

Maps operators to negated operators. Used to facilitate propagation of negation down a tree of conditions.

and

and: string = "or"

contains

contains: string = "notContains"

eq

eq: string = "ne"

ge

ge: string = "lt"

gt

gt: string = "le"

le

le: string = "gt"

lt

lt: string = "ge"

ne

ne: string = "eq"

not

not: string = "and"

notContains

notContains: string = "contains"

or

or: string = "and"

Const opResultDefaults

opResultDefaults: object

items

items: undefined[] = []

nextToken

nextToken: null = null

startedAt

startedAt: null = null

Const parser

parser: object

Pure JS XML parser that can be used in Non-browser environments, like React Native and Node.js. This is the same XML parser implementation as used in AWS SDK S3 client. It depends on pure JavaScript XML parser library fast-xml-parser. Drop-in replacement for fast-xml-parser's XmlParser class used in the AWS SDK S3 client XML deserializer. This implementation is not tested against the full xml conformance test suite. It is only tested against the XML responses from S3. This implementation requires the DOMParser class in the runtime.

Ref: https://github.com/aws/aws-sdk-js-v3/blob/1e806ba3f4a83c9e3eb0b41a3a7092da93826b8f/clients/client-s3/src/protocols/Aws_restXml.ts#L12938-L12959

parse

  • parse(xmlStr: string): any
  • parse(xmlStr: string): any

Const partitionsInfo

partitionsInfo: object

This data is adapted from the partition file from AWS SDK shared utilities but remove some contents for bundle size concern. Information removed are dualStackDnsSuffix, supportDualStack, supportFIPS, restricted partitions, and list of regions for each partition other than global regions.

internal

partitions

partitions: object[] = [defaultPartition,{id: 'aws-cn',outputs: {dnsSuffix: 'amazonaws.com.cn',},regionRegex: '^cn\\-\\w+\\-\\d+$',regions: ['aws-cn-global'],},]

Const pinpointValidationErrorMap

pinpointValidationErrorMap: object

[PinpointValidationErrorCode.NoAppId]

[PinpointValidationErrorCode.NoAppId]: object

message

message: string = "Missing application id."

Const pushNotificationValidationErrorMap

pushNotificationValidationErrorMap: object

[PushNotificationValidationErrorCode.NoAppId]

[PushNotificationValidationErrorCode.NoAppId]: object

message

message: string = "Missing application id."

[PushNotificationValidationErrorCode.NoCredentials]

[PushNotificationValidationErrorCode.NoCredentials]: object

message

message: string = "Credentials should not be empty."

[PushNotificationValidationErrorCode.NoRegion]

[PushNotificationValidationErrorCode.NoRegion]: object

message

message: string = "Missing region."

[PushNotificationValidationErrorCode.NotInitialized]

[PushNotificationValidationErrorCode.NotInitialized]: object

message

message: string = "Push notification has not been initialized."

recoverySuggestion

recoverySuggestion: string = "Please make sure to first call `initializePushNotifications`."

Const serverContextRegistry

serverContextRegistry: object

deregister

get

register

Const serviceWorkerErrorMap

serviceWorkerErrorMap: object

[ServiceWorkerErrorCode.Unavailable]

[ServiceWorkerErrorCode.Unavailable]: object

message

message: string = "Service Worker not available."

[ServiceWorkerErrorCode.UndefinedInstance]

[ServiceWorkerErrorCode.UndefinedInstance]: object

message

message: string = "Service Worker instance is undefined."

[ServiceWorkerErrorCode.UndefinedRegistration]

[ServiceWorkerErrorCode.UndefinedRegistration]: object

message

message: string = "Service Worker registration is undefined."

Const sortDirectionMap

sortDirectionMap: object

ASCENDING

ASCENDING: string = "ASC"

DESCENDING

DESCENDING: string = "DESC"

Const subscriptionErrorMap

subscriptionErrorMap: object

BadModel

  • BadModel(): false

BadRecord

  • BadRecord(): false

ConfigError

  • ConfigError(): false

Transient

  • Transient(observableError: Error): boolean

Unauthorized

  • Unauthorized(observableError: Error): boolean

Const syncErrorMap

syncErrorMap: object

BadModel

  • BadModel(): false

BadRecord

  • BadRecord(error: Error): boolean

ConfigError

  • ConfigError(): false

Transient

  • Transient(error: Error): boolean

Unauthorized

  • Unauthorized(error: Error): boolean

Const textEncoder

textEncoder: object

convert

  • convert(input: string): Uint8Array

Const tokenValidationErrorMap

tokenValidationErrorMap: object

[TokenProviderErrorCode.InvalidAuthTokens]

[TokenProviderErrorCode.InvalidAuthTokens]: object

message

message: string = "Invalid tokens."

recoverySuggestion

recoverySuggestion: string = "Make sure the tokens are valid."

Const utils

utils: object

USER

isModelConstructor

isModelConstructor: isModelConstructor

isNonModelConstructor

isNonModelConstructor: isNonModelConstructor

traverseModel

traverseModel: traverseModel

validatePredicate

validatePredicate: validatePredicate

Const validationErrorMap

validationErrorMap: object

[APIValidationErrorCode.NoAuthSession]

[APIValidationErrorCode.NoAuthSession]: object

message

message: string = "Auth session should not be empty."

[APIValidationErrorCode.NoCustomEndpoint]

[APIValidationErrorCode.NoCustomEndpoint]: object

message

message: string = "Custom endpoint region is present without custom endpoint."

[APIValidationErrorCode.NoRegion]

[APIValidationErrorCode.NoRegion]: object

message

message: string = "Missing region."

[AnalyticsValidationErrorCode.InvalidFlushSize]

[AnalyticsValidationErrorCode.InvalidFlushSize]: object

message

message: string = "Invalid FlushSize, it should be smaller than BufferSize"

[AnalyticsValidationErrorCode.InvalidTracker]

[AnalyticsValidationErrorCode.InvalidTracker]: object

message

message: string = "Invalid tracker type specified."

[AnalyticsValidationErrorCode.NoAppId]

[AnalyticsValidationErrorCode.NoAppId]: object

message

message: string = "Missing application id."

[AnalyticsValidationErrorCode.NoCredentials]

[AnalyticsValidationErrorCode.NoCredentials]: object

message

message: string = "Credentials should not be empty."

[AnalyticsValidationErrorCode.NoEventName]

[AnalyticsValidationErrorCode.NoEventName]: object

message

message: string = "Events must specify a name."

[AnalyticsValidationErrorCode.NoRegion]

[AnalyticsValidationErrorCode.NoRegion]: object

message

message: string = "Missing region."

[AnalyticsValidationErrorCode.NoTrackingId]

[AnalyticsValidationErrorCode.NoTrackingId]: object

message

message: string = "A trackingId is required to use Amazon Personalize"

[AnalyticsValidationErrorCode.UnsupportedPlatform]

[AnalyticsValidationErrorCode.UnsupportedPlatform]: object

message

message: string = "Only session tracking is supported on React Native."

[AuthValidationErrorCode.CustomAuthSignInPassword]

[AuthValidationErrorCode.CustomAuthSignInPassword]: object

message

message: string = "A password is not needed when signing in with CUSTOM_WITHOUT_SRP"

recoverySuggestion

recoverySuggestion: string = "Do not include a password in your signIn call."

[AuthValidationErrorCode.EmptyChallengeResponse]

[AuthValidationErrorCode.EmptyChallengeResponse]: object

message

message: string = "challengeResponse is required to confirmSignIn"

[AuthValidationErrorCode.EmptyConfirmResetPasswordConfirmationCode]

[AuthValidationErrorCode.EmptyConfirmResetPasswordConfirmationCode]: object

message

message: string = "confirmationCode is required to confirmResetPassword"

[AuthValidationErrorCode.EmptyConfirmResetPasswordNewPassword]

[AuthValidationErrorCode.EmptyConfirmResetPasswordNewPassword]: object

message

message: string = "newPassword is required to confirmResetPassword"

[AuthValidationErrorCode.EmptyConfirmResetPasswordUsername]

[AuthValidationErrorCode.EmptyConfirmResetPasswordUsername]: object

message

message: string = "username is required to confirmResetPassword"

[AuthValidationErrorCode.EmptyConfirmSignUpCode]

[AuthValidationErrorCode.EmptyConfirmSignUpCode]: object

message

message: string = "code is required to confirmSignUp"

[AuthValidationErrorCode.EmptyConfirmSignUpUsername]

[AuthValidationErrorCode.EmptyConfirmSignUpUsername]: object

message

message: string = "username is required to confirmSignUp"

[AuthValidationErrorCode.EmptyConfirmUserAttributeCode]

[AuthValidationErrorCode.EmptyConfirmUserAttributeCode]: object

message

message: string = "confirmation code is required to confirmUserAttribute"

[AuthValidationErrorCode.EmptyResendSignUpCodeUsername]

[AuthValidationErrorCode.EmptyResendSignUpCodeUsername]: object

message

message: string = "username is required to confirmSignUp"

[AuthValidationErrorCode.EmptyResetPasswordUsername]

[AuthValidationErrorCode.EmptyResetPasswordUsername]: object

message

message: string = "username is required to resetPassword"

[AuthValidationErrorCode.EmptySignInPassword]

[AuthValidationErrorCode.EmptySignInPassword]: object

message

message: string = "password is required to signIn"

[AuthValidationErrorCode.EmptySignInUsername]

[AuthValidationErrorCode.EmptySignInUsername]: object

message

message: string = "username is required to signIn"

[AuthValidationErrorCode.EmptySignUpPassword]

[AuthValidationErrorCode.EmptySignUpPassword]: object

message

message: string = "password is required to signUp"

[AuthValidationErrorCode.EmptySignUpUsername]

[AuthValidationErrorCode.EmptySignUpUsername]: object

message

message: string = "username is required to signUp"

[AuthValidationErrorCode.EmptyUpdatePassword]

[AuthValidationErrorCode.EmptyUpdatePassword]: object

message

message: string = "oldPassword and newPassword are required to changePassword"

[AuthValidationErrorCode.EmptyVerifyTOTPSetupCode]

[AuthValidationErrorCode.EmptyVerifyTOTPSetupCode]: object

message

message: string = "code is required to verifyTotpSetup"

[AuthValidationErrorCode.IncorrectMFAMethod]

[AuthValidationErrorCode.IncorrectMFAMethod]: object

message

message: string = "Incorrect MFA method was chosen. It should be either SMS or TOTP"

recoverySuggestion

recoverySuggestion: string = "Try to pass TOTP or SMS as the challengeResponse"

[InAppMessagingValidationErrorCode.NoAppId]

[InAppMessagingValidationErrorCode.NoAppId]: object

message

message: string = "Missing application id."

[InAppMessagingValidationErrorCode.NoCredentials]

[InAppMessagingValidationErrorCode.NoCredentials]: object

message

message: string = "Credentials should not be empty."

[InAppMessagingValidationErrorCode.NoRegion]

[InAppMessagingValidationErrorCode.NoRegion]: object

message

message: string = "Missing region."

[InAppMessagingValidationErrorCode.NotInitialized]

[InAppMessagingValidationErrorCode.NotInitialized]: object

message

message: string = "In-app messaging has not been initialized."

recoverySuggestion

recoverySuggestion: string = "Please make sure to first call `initializePushNotifications`."

[InteractionsValidationErrorCode.NoBotConfig]

[InteractionsValidationErrorCode.NoBotConfig]: object

message

message: string = "Missing configuration for the bot"

[PredictionsValidationErrorCode.CelebrityDetectionNotEnabled]

[PredictionsValidationErrorCode.CelebrityDetectionNotEnabled]: object

message

message: string = "Celebrity Detection must be enabled."

[PredictionsValidationErrorCode.InvalidInput]

[PredictionsValidationErrorCode.InvalidInput]: object

message

message: string = "Input does not conform to expected type."

[PredictionsValidationErrorCode.InvalidSource]

[PredictionsValidationErrorCode.InvalidSource]: object

message

message: string = "Source type not supported."

[PredictionsValidationErrorCode.NoCredentials]

[PredictionsValidationErrorCode.NoCredentials]: object

message

message: string = "Credentials should not be empty."

[PredictionsValidationErrorCode.NoLanguage]

[PredictionsValidationErrorCode.NoLanguage]: object

message

message: string = "Missing language."

[PredictionsValidationErrorCode.NoRegion]

[PredictionsValidationErrorCode.NoRegion]: object

message

message: string = "Missing region."

[PredictionsValidationErrorCode.NoSourceLanguage]

[PredictionsValidationErrorCode.NoSourceLanguage]: object

message

message: string = "Missing source language for translation."

[PredictionsValidationErrorCode.NoSource]

[PredictionsValidationErrorCode.NoSource]: object

message

message: string = "Missing source."

[PredictionsValidationErrorCode.NoTargetLanguage]

[PredictionsValidationErrorCode.NoTargetLanguage]: object

message

message: string = "Missing target language for translation."

[PredictionsValidationErrorCode.NoVoiceId]

[PredictionsValidationErrorCode.NoVoiceId]: object

message

message: string = "Missing voice id."

[RestApiValidationErrorCode.InvalidApiName]

[RestApiValidationErrorCode.InvalidApiName]: object

message

message: string = "API name is invalid."

recoverySuggestion

recoverySuggestion: string = "Check if the API name matches the one in your configuration or `aws-exports.js`"

[RestApiValidationErrorCode.NoCredentials]

[RestApiValidationErrorCode.NoCredentials]: object

message

message: string = "Credentials should not be empty."

[StorageValidationErrorCode.InvalidUploadSource]

[StorageValidationErrorCode.InvalidUploadSource]: object

message

message: string = "Upload source type can only be a `Blob`, `File`, `ArrayBuffer`, or `string`."

[StorageValidationErrorCode.NoBucket]

[StorageValidationErrorCode.NoBucket]: object

message

message: string = "Missing bucket name while accessing object."

[StorageValidationErrorCode.NoCredentials]

[StorageValidationErrorCode.NoCredentials]: object

message

message: string = "Credentials should not be empty."

[StorageValidationErrorCode.NoDestinationKey]

[StorageValidationErrorCode.NoDestinationKey]: object

message

message: string = "Missing destination key in copy api call."

[StorageValidationErrorCode.NoIdentityId]

[StorageValidationErrorCode.NoIdentityId]: object

message

message: string = "Missing identity ID when accessing objects in protected or private access level."

[StorageValidationErrorCode.NoKey]

[StorageValidationErrorCode.NoKey]: object

message

message: string = "Missing key in api call."

[StorageValidationErrorCode.NoRegion]

[StorageValidationErrorCode.NoRegion]: object

message

message: string = "Missing region while accessing object."

[StorageValidationErrorCode.NoSourceKey]

[StorageValidationErrorCode.NoSourceKey]: object

message

message: string = "Missing source key in copy api call."

[StorageValidationErrorCode.ObjectIsTooLarge]

[StorageValidationErrorCode.ObjectIsTooLarge]: object

message

message: string = "Object size cannot not be greater than 5TB."

[StorageValidationErrorCode.UrlExpirationMaxLimitExceed]

[StorageValidationErrorCode.UrlExpirationMaxLimitExceed]: object

message

message: string = "Url Expiration can not be greater than 7 Days."